scala-js-dom icon indicating copy to clipboard operation
scala-js-dom copied to clipboard

add roundRect

Open buntec opened this issue 6 months ago • 2 comments

Hi there!

Before submitting a PR containing any Scala changes, please make sure you...

  • run sbt prePR
  • commit changes to api-reports

Thanks for contributing!

buntec avatar Jan 05 '24 18:01 buntec

Alas, that radii param is a mess to encode (probably why this method was missing in the first place).

buntec avatar Jan 05 '24 18:01 buntec

Alas, that radii param is a mess to encode (probably why this method was missing in the first place).

Oh yup, from https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-roundrect

If radii is an unrestricted double or [DOMPointInit] (https://drafts.fxtf.org/geometry/#dictdef-dompointinit), then set radii to « radii ».

If radii is not a list of size one, two, three, or four, then throw a RangeError.

I wonder if we should create a new enum type that encodes this or just stick with Any. What do you think @armanbilge?

zetashift avatar Jan 07 '24 23:01 zetashift