Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Shape fill with custom pattern

Open mariusa opened this issue 3 years ago • 5 comments

Hi,

I saw it's possible to fill a shape with a solid or gradient color.

Could custom patterns be supported too?

Here's a screenshot from Excalidraw: Screenshot from 2023-01-08 15-21-18

Thanks!

mariusa avatar Jan 08 '23 13:01 mariusa

This will be possible with the node system in the future by generating any kind of pattern you'd like.

Keavon avatar Jan 08 '23 23:01 Keavon

This will be possible with the node system in the future by generating any kind of pattern you'd like.

Now we have the node system we probably need to think about how we add this to the vector data format.

0HyperCube avatar Feb 29 '24 21:02 0HyperCube

Yup! One consideration is just the rendering aspect (Vello and SVG, the latter of which will require SVG's masking feature). The other consideration is perhaps how to encode the repeating pattern starting point. Also, merging this conceptually with gradients would be useful too.

Keavon avatar Feb 29 '24 21:02 Keavon

Note that in svg there is the pattern element https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Patterns

0HyperCube avatar Feb 29 '24 22:02 0HyperCube

Oh yes, good point.

Keavon avatar Feb 29 '24 23:02 Keavon