Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue fill path #22

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Issue fill path #22

wants to merge 18 commits into from

Conversation

k1w1
Copy link

@k1w1 k1w1 commented Aug 22, 2022

Support filling and stroking paths. Allows code like:

const path = ctx.createPath(`M 230 80
    A 45 45, 0, 1, 0, 275 125
    L 275 80 Z`);

ctx.strokeStyle = 'red';
ctx.stroke(path);

Fixes #20

k1w1 and others added 18 commits July 15, 2022 17:57
Fix rendering of arcTo when a scale is applied
Bring in changes from zenozeng/svgcanvas
Otherwise the SVGs we generate can't be opened by editing tools like Figma.
…ion in the test, but not for lines curving in other directions.
However this is not correctly handling the transform. To do it correctly we need to store the sub-paths in the path in their original form (not a string) and apply the transforms at render time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling Context.fill with a path does not work
1 participant