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

Patterns #166

Open
camilleroux opened this issue Dec 14, 2021 · 2 comments
Open

Patterns #166

camilleroux opened this issue Dec 14, 2021 · 2 comments

Comments

@camilleroux
Copy link

Hi,

Is there a way to create patterns like in SVG?
Can I do it at least in a SVGSpace?

@williamngan
Copy link
Owner

Thanks @camilleroux - that would be a great feature to add to Pts. I need to think about how to make it simple.

For now, you can try the standard API from canvas, eg, form.ctx.createPattern(...)

See MDN docs: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern

@williamngan
Copy link
Owner

Hi again @camilleroux! Took me a while but I finished it -- the Img class now supports both static and dynamic patterns in Canvas. Take a look at the guide here and let me know if you have feedback. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants