Implement roundRect for canvas2D
Categories
(Core :: Graphics: Canvas2D, enhancement, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox112 | --- | fixed |
People
(Reporter: aaronhk, Assigned: evilpie)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Steps to reproduce:
Original proposal: https://github.com/fserb/canvas2D/blob/master/spec/roundrect.md
Spec: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-roundrect
Recent spec change: https://github.com/whatwg/html/pull/7621#event-6093663928
Comment 1•3 years ago
|
||
Do you think we need to prioritize this?
Comment 2•3 years ago
|
||
If it is in the spec and someone wants to go ahead and implement it, I don't see why not, but unless it's a webcompat issue I don't know that it's a distinct priority yet?
Updated•3 years ago
|
Comment 5•3 years ago
|
||
(In reply to Deebash D from comment #4)
Can I work on this?
Anyone is welcome to contribute to Mozilla, if they feel they're up to it. If it is your first time contributing code to Mozilla, reviewing https://firefox-source-docs.mozilla.org/setup/contributing_code.html is probably of use.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Assignee | ||
Comment 7•2 years ago
|
||
I implemented parts of this, but I probably won't be able to finish this without some help.
- Bug 1814235 means the current WebIDL as specified doesn't work
- I don't understand how to support
mDSPathBuilder
, which seems to require transforming everything? - The CanvasPath implementation is missing, but hopefully we can just re-use most of the CanvasRenderingContext2D implementation for that.
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 8•2 years ago
|
||
Hi Andrew! Maybe you could give me some hints? See comment 7, especially point two and three.
Comment 9•2 years ago
|
||
(In reply to Tom S [:evilpie] from comment #7)
- Bug 1814235 means the current WebIDL as specified doesn't work
I landed a fix for this, it should work now. Let me know if you run into any other issues!
Assignee | ||
Comment 10•2 years ago
|
||
Thank you Peter! We are now down to only two failures in the WPT html/canvas/element/path-objects/
test suite, those might be related to the scaling that is supposed to be done in Step 11? The two other questions, particular about mDSPathBuilder
remain.
/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html
FAIL Check that roundRects with intersecting corner arcs are rendered correctly. - assert_equals: Red channel of the pixel at (2, 25) expected 0 but got 63
/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html
FAIL Check that roundRects with intersecting corner arcs are rendered correctly. - assert_equals: Red channel of the pixel at (1, 1) expected 255 but got 0
Assignee | ||
Comment 11•2 years ago
|
||
Thanks everyone for your hints, we are only with those two failures in comment 10 left now.
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 12•2 years ago
|
||
Comment 13•2 years ago
|
||
bugherder |
Comment 14•2 years ago
|
||
FF112 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/25359.
Essentially this is just an MDN release note and browser compatibility data update, since this API is documented.
Description
•