Rotatable, Scalable patterns
Open, WishlistPublic

Description

"Patterns are used in many places, for many purposes: to fill layers, to fill geometric strokes, to fill vector objects. It would be really useful to have an easy way to rotate, translate and scale the patterns. It's going to need a lot of deep hacking, even after the vector tools work has been done."

Implies:

  • Rotate, scale and translate for vector fill, geometric fill, general fill and fill layers.

Notes:

  • All this for the brush texture will be more tricky.
  • SVG supports rotate and resize for patterns.
  • Vector patterns were discussed but don't fall under this stretchgoal.
woltherav added a comment.EditedOct 20 2019, 12:38 PM

Okay, having slept on it, and looking at the code again, Cairo is not doing a per pixel transformation, but rather is just passing on the matrix to... wherever, and I for the live of me cannot find the place where the transform is applied to the pixel. I do suspect the that per-pixel transform might be a strategy to pursue. (so, pixel to paint x, invert transform on x, what do we find in the original tiled pattern at that location, paint that at x), but I am not smart enough to understand how we'd apply transform filters here.

EDIT:

Thinking about it further, this bug in inkscape (which doesn't link to the actual fix :| ), seems to imply that cairo rotates the pattern and then paints it staggered. The bug then seems to be caused by 'fractional' widths are heights?