-
-
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
Not work ClipPath/Path on Android #280
Comments
href
is marked as required in Image
, but its value is undefined
Can I use this.state.image instead of this.prop.image? |
Did you find out why it's not working? |
+1 |
If others are still having issues with this, please post your versions of react-native-svg, react-native, and android to help narrow down the problem. |
@dustinsavery clipPath prop for Image is not working. This is my code:
|
@logvi thanks for posting, I'll take a look |
@dustinsavery I am also facing the same problem of ClipPath is not working in android, whereas it is working fine in iOS. Can you provide me the alternative or work around for this issue? Awaiting for your reply. |
I haven't had any success locating the source of the problem. I am no android expert though. Hopefully someone with more android experience can help here. |
Same problem at 6.3.1 version. For iOS everything is fine, but on android ClipPath doesn't working. Is there some solution? |
Well,I have the same problem too,
working fine in iOS , And in android it does not work,
(This code work different in iOS) The second code in Android it run good, but run different in iOS. I Because the origin point and Y-axis direction is different . |
I've fixed the transform handling for ClipPath on Android, and the spec conformance on both iOS and Android. Any help in testing would be much appreciated! msand@a1097b8 |
https://www.w3.org/TR/SVG11/masking.html#EstablishingANewClippingPath The raw geometry of each child element exclusive of rendering properties such as ‘fill’, ‘stroke’, ‘stroke-width’ within a ‘clipPath’ conceptually defines a 1-bit mask (with the possible exception of anti-aliasing along the edge of the geometry) which represents the silhouette of the graphics associated with that element. Anything outside the outline of the object is masked out. If a child element is made invisible by ‘display’ or ‘visibility’ it does not contribute to the clipping path. When the ‘clipPath’ element contains multiple child elements, the silhouettes of the child elements are logically OR'd together to create a single silhouette which is then used to restrict the region onto which paint can be applied. Thus, a point is inside the clipping path if it is inside any of the children of the ‘clipPath’. For a given graphics element, the actual clipping path used will be the intersection of the clipping path specified by its ‘clip-path’ property (if any) with any clipping paths on its ancestors, as specified by the ‘clip-path’ property on the ancestor elements, or by the ‘overflow’ property on ancestor elements which establish a new viewport. Also, see the discussion of the initial clipping path.) Fixes issues highlighted by software-mansion#752 Fix software-mansion#280 Fix software-mansion#517 [android] Fix software-mansion#766 `Region.Op.REPLACE` is deprecated in API level 28 Replace with clipPath (Path path) to Intersect instead.
https://www.w3.org/TR/SVG11/masking.html#EstablishingANewClippingPath The raw geometry of each child element exclusive of rendering properties such as ‘fill’, ‘stroke’, ‘stroke-width’ within a ‘clipPath’ conceptually defines a 1-bit mask (with the possible exception of anti-aliasing along the edge of the geometry) which represents the silhouette of the graphics associated with that element. Anything outside the outline of the object is masked out. If a child element is made invisible by ‘display’ or ‘visibility’ it does not contribute to the clipping path. When the ‘clipPath’ element contains multiple child elements, the silhouettes of the child elements are logically OR'd together to create a single silhouette which is then used to restrict the region onto which paint can be applied. Thus, a point is inside the clipping path if it is inside any of the children of the ‘clipPath’. For a given graphics element, the actual clipping path used will be the intersection of the clipping path specified by its ‘clip-path’ property (if any) with any clipping paths on its ancestors, as specified by the ‘clip-path’ property on the ancestor elements, or by the ‘overflow’ property on ancestor elements which establish a new viewport. Also, see the discussion of the initial clipping path.) Fixes issues highlighted by software-mansion/react-native-svg#752 Fix software-mansion/react-native-svg#280 Fix software-mansion/react-native-svg#517 [android] Fix software-mansion/react-native-svg#766 `Region.Op.REPLACE` is deprecated in API level 28 Replace with clipPath (Path path) to Intersect instead.
1.)
2.) Run on ios - All good!
3.) Run on android - Does not work
Why ?
The text was updated successfully, but these errors were encountered: