nilzona / path2d-polyfill

Polyfills Path2D api for canvas rendering
29 stars 10 forks source link

Fix rounded rect bottom-right corner #86

Open ddadamhooper opened 1 week ago

ddadamhooper commented 1 week ago

roundRect() gets the bottom-right corner wrong, when there's no radius. See example at https://playcode.io/2056390

    roundRect.call(ctx, 10, 10, 60, 60, [15, 15, 15, 0]);
    ctx.lineWidth = 10
    ctx.stroke()

Upstream:

Screenshot from 2024-10-23 22-34-28

Fixed with closePath(): Screenshot from 2024-10-23 22-34-43

changeset-bot[bot] commented 1 week ago

⚠️ No Changeset found

Latest commit: 123bc75c9ac81cedc65d1ac5df0c4a192dc91184

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR