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

Some RadialGradient is not drawn #10

Closed
2n opened this issue Aug 17, 2022 · 2 comments
Closed

Some RadialGradient is not drawn #10

2n opened this issue Aug 17, 2022 · 2 comments

Comments

@2n
Copy link
Contributor

2n commented Aug 17, 2022

Sorry to bother you again.

It seems to be drawn when both stop-color and stop-opacity are inside the <stop> tag, but not when only stop-opacity is present.

The following RadialGradient is drawn,

<radialGradient id="paint6_radial_31_1432" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(20.5 18) rotate(9.86581) scale(11.6726)">
<stop stop-color="#FFA64B"/>
<stop offset="0.900412" stop-color="#FFAE46" stop-opacity="0"/>
</radialGradient>

but the following is not drawn.

<radialGradient id="paint7_radial_31_1432" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(17.5 15) rotate(43.9708) scale(59.0529)">
<stop offset="0.185425" stop-opacity="0"/>
<stop offset="1" stop-opacity="0.4"/>
</radialGradient>

I noticed this because angry_face_color.svg had subtle differences from the originals, even though they did not contain unsupported tags.

This is based on my poor research and I apologize if I am wrong.

@swhitty
Copy link
Owner

swhitty commented Aug 18, 2022

Good pickup, SwiftDraw was incorrectly defaulting to currentColor when a stop-color was not defined causing the gradients to not be rendered.

This has been fixed in 0.11.1

@2n
Copy link
Contributor Author

2n commented Aug 18, 2022

Thanks for the quick bug fix.
Now it draws very precisely.
Awesome!

@2n 2n closed this as completed Aug 18, 2022
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

No branches or pull requests

2 participants