Skip to content
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

Remove transform attribute from images and paths #668

Merged
merged 9 commits into from
Oct 14, 2023

Conversation

LaurenzV
Copy link
Contributor

Since all transforms on paths and images will be added in the form as a group, we won't really need them on Image and Path anymore. This makes the tree a bit simpler.

I hope I didn't miss anything.

@RazrFalcon
Copy link
Collaborator

I guess you can update crates/usvg/docs/spec.adoc as well. Remove it from image and note that only paths inside clipPath can have a transform.

@RazrFalcon
Copy link
Collaborator

If I remember correctly, transform is set only on groups because filter, mask and clip-path can be set only on groups. And

<g mask="..." transform="...">
   <path/>
</g>

is not the same as:

<g mask="...">
   <path transform="..."/>
</g>

The confusing part is that fill and stroke would still be set on the path, despite the fact they are also affected by the transform.

Groups in SVG is a very strange and counter-intuitive concept. I wrote about them a bit here and here.

@RazrFalcon RazrFalcon merged commit 348b2cc into linebender:master Oct 14, 2023
3 checks passed
@RazrFalcon
Copy link
Collaborator

Thanks!

@LaurenzV LaurenzV deleted the simplify branch October 14, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants