-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Templates / Repeated elements #8
Comments
Yes, this is something i'm still considering as it can make repetetive graphics a lot smaller. SVG can do that as well |
I think this can be implemented reasonably easily by calling the parser/interpreter recursively. As it also reduces the file size, we can load complexer graphics in less memory, so seeking shouldn't be a huge problem. My current idea would be two new commands:
|
something like |
Oh yeah, that's a good idea. This would allow a lot of stuff to be made. I'll think a bit about precise semantics, but i'm already happy with the idea. With offset and rotation around point you can probably duplicate any part of the image into another position. Not sure if we should support scale/shearing, as those usually are more abused than used |
Reuse scaled is definitely useful. Shear ... I'm not sure how often it's used but IMO it's odd to have everything except shear. Maybe just off a setTransform that takes a full affine matrix as a fallback? |
This is something i wanna prevent, but maybe it's the smarter idea. Encoding-wise it would be better to have offset, rotate, scale tho |
QQ, from a quick skim it seems to me that repeated identical shapes must be fully reproduced? - apologies if I simply misunderstood.
If you provide the ability to reuse parts you may more significantly outperform svg on size in some cases. For example, in COLRv1 we allow reuse with a new fill and a transform applied.
The text was updated successfully, but these errors were encountered: