williamngan/pts

Patterns

camilleroux opened this issue · 2 comments

Hi,

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

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

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.