mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-09 01:25:01 +00:00
clipPathId => clipPathRef
This commit is contained in:
@@ -48,7 +48,7 @@ public abstract class RNSVGVirtualNode extends LayoutShadowNode {
|
|||||||
protected @Nullable Matrix mMatrix = new Matrix();
|
protected @Nullable Matrix mMatrix = new Matrix();
|
||||||
|
|
||||||
protected @Nullable Path mClipPath;
|
protected @Nullable Path mClipPath;
|
||||||
protected @Nullable String mClipPathId;
|
protected @Nullable String mClipPathRef;
|
||||||
private static final int PATH_TYPE_ARC = 4;
|
private static final int PATH_TYPE_ARC = 4;
|
||||||
private static final int PATH_TYPE_CLOSE = 1;
|
private static final int PATH_TYPE_CLOSE = 1;
|
||||||
private static final int PATH_TYPE_CURVETO = 3;
|
private static final int PATH_TYPE_CURVETO = 3;
|
||||||
@@ -112,8 +112,8 @@ public abstract class RNSVGVirtualNode extends LayoutShadowNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ReactProp(name = "clipPathRef")
|
@ReactProp(name = "clipPathRef")
|
||||||
public void setClipPathId(String clipPathRef) {
|
public void setClipPathRef(String clipPathRef) {
|
||||||
mClipPathId = clipPathRef;
|
mClipPathRef = clipPathRef;
|
||||||
markUpdated();
|
markUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,8 +266,8 @@ public abstract class RNSVGVirtualNode extends LayoutShadowNode {
|
|||||||
|
|
||||||
protected void clip(Canvas canvas, Paint paint) {
|
protected void clip(Canvas canvas, Paint paint) {
|
||||||
Path clip = mClipPath;
|
Path clip = mClipPath;
|
||||||
if (clip == null && mClipPathId != null) {
|
if (clip == null && mClipPathRef != null) {
|
||||||
clip = getSvgShadowNode().getDefinedClipPath(mClipPathId);
|
clip = getSvgShadowNode().getDefinedClipPath(mClipPathRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clip != null) {
|
if (clip != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user