pts icon indicating copy to clipboard operation
pts copied to clipboard

Patterns

Open camilleroux opened this issue 2 years ago • 2 comments

Hi,

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

camilleroux avatar Dec 14 '21 13:12 camilleroux

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 avatar Dec 15 '21 08:12 williamngan

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.

williamngan avatar Jul 28 '22 09:07 williamngan