We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
gradientUnits="userSpaceOnUse" is not working with viewBox
gradientUnits="userSpaceOnUse"
viewBox
With viewBox(iOS & Android & Web): Without viewBox(iOS & Android & Web):
I think userSpaceOnUse is not correctly scaling with viewBox but I'm not sure. objectBoundingBox is working as expected like on web.
Expo snack has reproducible example of svg
https://snack.expo.dev/XdF3aIhDlSkjbhRBbHpzK
15.9.0
0.76.3
Android, iOS
None
Paper (Old Architecture)
Debug app & dev bundle
iOS simulator
No response
Yes
The text was updated successfully, but these errors were encountered:
I took a glance at the native code, and seems like LinearGradient does not scale with viewBox.
<Svg width="800" height="800" viewBox="0 0 10 10"> <LinearGradient id="test" x1="0%" y1="0%" x2="0%" y2="100%" gradientUnits="userSpaceOnUse" > <Stop offset="0%" stopColor="green" /> <Stop offset="100%" stopColor="red" /> </LinearGradient> </Svg>
Svg is scaled but the gradient remains 10x10, so only small a parts of it applied to the shape.
Sorry, something went wrong.
No branches or pull requests
Description
gradientUnits="userSpaceOnUse"
is not working withviewBox
With viewBox(iOS & Android & Web):
Without viewBox(iOS & Android & Web):
I think userSpaceOnUse is not correctly scaling with viewBox but I'm not sure. objectBoundingBox is working as expected like on web.
Steps to reproduce
Expo snack has reproducible example of svg
Snack or a link to a repository
https://snack.expo.dev/XdF3aIhDlSkjbhRBbHpzK
SVG version
15.9.0
React Native version
0.76.3
Platforms
Android, iOS
JavaScript runtime
None
Workflow
None
Architecture
Paper (Old Architecture)
Build type
Debug app & dev bundle
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: