-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
IOS: Rendering Issue #1118
Comments
Seems there's some strange issue, this seems to work (change r="1" to r="100%"): <radialGradient id="paint0_radial" cx="0" cy="0" r="100%" gradientUnits="userSpaceOnUse" gradientTransform="translate(22 22) scale(9.691)">
<stop stop-color="#A5AAB2"/>
<stop offset="1" stop-color="#BEC2C9"/>
</radialGradient> |
That works, thank you. |
Well, It doesn't actually work as intended before, the gradient doesn't seem to appear |
Actually it seems like all gradientUnits="userSpaceOnUse" are behaving according to a mixture of that and gradientUnits="objectBoundingBox". Seems to work correctly when using percentages, so replace with e.g. <radialGradient id="paint3_radial" cx="50%" cy="50%" r="60%">
<stop stop-color="#F77445"/>
<stop offset="1" stop-color="#FEB060"/>
</radialGradient>
<radialGradient id="paint4_radial" cx="50%" cy="50%" r="60%">
<stop stop-color="#F77445"/>
<stop offset="1" stop-color="#FEB060"/>
</radialGradient>
<radialGradient id="paint5_radial" cx="50%" cy="50%" r="60%">
<stop stop-color="#F77445"/>
<stop offset="1" stop-color="#FEB060"/>
</radialGradient> In this case. I would recommend using objectBoundingBox with percentages in all the gradient attributes for now until this get fixed properly. |
Can you try with the latest commit from the master branch? |
## [9.9.7](v9.9.6...v9.9.7) (2019-09-28) ### Bug Fixes * add gradientTransform to d.ts ([3f08c46](3f08c46)), closes [#1069](#1069) * handling of gradients without stops ([18828c0](18828c0)), closes [#1099](#1099) * handling of rounded rect ([c12d66e](c12d66e)), closes [#1112](#1112) * units in linear and radial gradients ([70c54e6](70c54e6)), closes [#1110](#1110) [#1118](#1118)
🎉 This issue has been resolved in version 9.9.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [9.9.7](software-mansion/react-native-svg@v9.9.6...v9.9.7) (2019-09-28) ### Bug Fixes * add gradientTransform to d.ts ([3f08c46](software-mansion/react-native-svg@3f08c46)), closes [#1069](software-mansion/react-native-svg#1069) * handling of gradients without stops ([18828c0](software-mansion/react-native-svg@18828c0)), closes [#1099](software-mansion/react-native-svg#1099) * handling of rounded rect ([c12d66e](software-mansion/react-native-svg@c12d66e)), closes [#1112](software-mansion/react-native-svg#1112) * units in linear and radial gradients ([70c54e6](software-mansion/react-native-svg@70c54e6)), closes [#1110](software-mansion/react-native-svg#1110) [#1118](software-mansion/react-native-svg#1118)
Bug
Environment info
React native info output:
Library version: 9.9.5
Steps To Reproduce
Use this svg on an iOS Simulator device:
Describe what you expected to happen:
Correct render:

Wrong render:

The text was updated successfully, but these errors were encountered: