forma icon indicating copy to clipboard operation
forma copied to clipboard

Affine transforms can't scale up

Open CryZe opened this issue 3 years ago • 1 comments

If you use anything outside -1 to 1, it fails to convert the affine transform. This almost seems intentional, but I can't find the justification for it anywhere and it seems unnecessary too, as all other renderers I've tried don't have any such limitation.

https://github.com/google/forma/blob/fcef3e29ce87219eefaaf87ad5363f8335114b71/forma/src/math/transform.rs#L117-L125

CryZe avatar Dec 17 '22 20:12 CryZe

Layer transforms are not supposed to scale up, only scale down, translate and rotate. For everything else, you'll have to transform the Path instead.

The distinction here is made because translating the layer is cheaper, if it fits the definition above. We should add pointers to this in the docs.

dragostis avatar Dec 17 '22 21:12 dragostis