-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
collapseGroups causes clip-path on images to be incorrect #101
Comments
grab the original SVG from here: |
ok, i got it :) |
the problem is a bit ambiguous because i think that i should to correct |
sounds like a good idea |
By the way; this SVG was created using pdftocairo (poppler utility) |
I am still having issues with this happening on a very simple file with a clipped image. Not exactly sure what is happening here, but after using SVGO, the image no longer appears (probably because the clip-path isn't clipping at the right coordinates or something. With collapseGroups enabled, the clip-path is added directly to the Example SVGs Does this have something to do with relative clip-path positioning? |
Firstly, I just wanted to congratulate you on a great project! I have done some initial testing and it looks like you've done some great progress already!
I have found a bug related to clip-path and how collapseGroups is working.
Original:
<clipPath id="clip2">
<path d="M 0 0 L 0 670.671875 L 759.160156 832.039062 L 765.355469 802.894531 L 765.355469 0 Z "/>
</clipPath>
<image id="image5" width="1305" height="1411" xlink:href="data:image/ ...." />
<g clip-path="url(#clip2)" clip-rule="nonzero">
<use xlink:href="#image5" transform="matrix(0.703976,0.149635,-0.149676,0.70417,51.664047,-356.818891)"/>
</g>
Result with collapseGroups active:
<clipPath id="b"><path d="M0 0v670.672l759.16 161.367 6.195-29.145v-802.895z"/></clipPath><image id="c" width="1305" height="1411" xlink:href="data:image/...: />
This causes images to be incorrectly clipped as in the screenshot attached
![Screen Shot 2013-02-17 at 8 41 53 AM](https://camo.githubusercontent.com/36bc19a0a946da7994214b287c8b63b6fefe5646fe3f6a1cce7a94cc0e06e596/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3233323236342f3136343034352f66306663326431382d373837302d313165322d396237662d6466656534336166353238352e706e67)
The text was updated successfully, but these errors were encountered: