[Webkit-unassigned] [Bug 202516] Implement 2d.path.rect so that it matches the winding rule
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 14 05:50:27 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=202516
--- Comment #4 from Karl Dubost <karlcow at apple.com> ---
// Drawing a green rectangle with a width of 100 and a height of 50
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
// start the path
ctx.beginPath();
// set the color to red.
ctx.fillStyle = '#f00';
// draw a square on the left side
ctx.rect(0, 0, 50, 50);
// draw a square on the right side
ctx.rect(100, 50, -50, -50);
// draw a rectangle on the top side
ctx.rect(0, 25, 100, -25);
// draw a rectangle on the bottom side
ctx.rect(100, 25, -100, 25);
// finish the path by filling
ctx.fill();
The shape at the end is not closed at all.
The paths defines cross inside the rectangle.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240514/5d42944b/attachment.htm>
More information about the webkit-unassigned
mailing list