You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/api/ReactAndroid.api
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3202,8 +3202,10 @@ public abstract interface class com/facebook/react/turbomodule/core/interfaces/T
3202
3202
3203
3203
public final class com/facebook/react/uimanager/BackgroundStyleApplicator {
3204
3204
public static final field INSTANCE Lcom/facebook/react/uimanager/BackgroundStyleApplicator;
3205
+
public static final fun beginMaskedDraw (Landroid/graphics/Canvas;Landroid/view/View;)I
3205
3206
public static final fun clipToPaddingBox (Landroid/view/View;Landroid/graphics/Canvas;)V
3206
3207
public static final fun clipToPaddingBoxWithAntiAliasing (Landroid/view/View;Landroid/graphics/Canvas;Lkotlin/jvm/functions/Function0;)V
3208
+
public static final fun endMaskedDraw (Landroid/graphics/Canvas;Landroid/view/View;I)V
3207
3209
public static final fun getBackgroundColor (Landroid/view/View;)Ljava/lang/Integer;
3208
3210
public static final fun getBorderColor (Landroid/view/View;Lcom/facebook/react/uimanager/style/LogicalEdge;)Ljava/lang/Integer;
3209
3211
public static final fun getBorderRadius (Landroid/view/View;Lcom/facebook/react/uimanager/style/BorderRadiusProp;)Lcom/facebook/react/uimanager/LengthPercentage;
@@ -3223,6 +3225,10 @@ public final class com/facebook/react/uimanager/BackgroundStyleApplicator {
3223
3225
public static final fun setBoxShadow (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3224
3226
public static final fun setBoxShadow (Landroid/view/View;Ljava/util/List;)V
3225
3227
public static final fun setFeedbackUnderlay (Landroid/view/View;Landroid/graphics/drawable/Drawable;)V
3228
+
public static final fun setMaskImage (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3229
+
public static final fun setMaskPosition (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3230
+
public static final fun setMaskRepeat (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3231
+
public static final fun setMaskSize (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3226
3232
public static final fun setOutlineColor (Landroid/view/View;Ljava/lang/Integer;)V
3227
3233
public static final fun setOutlineOffset (Landroid/view/View;F)V
3228
3234
public static final fun setOutlineStyle (Landroid/view/View;Lcom/facebook/react/uimanager/style/OutlineStyle;)V
@@ -3260,6 +3266,10 @@ public abstract class com/facebook/react/uimanager/BaseViewManager : com/faceboo
3260
3266
public fun setElevation (Landroid/view/View;F)V
3261
3267
public fun setFilter (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3262
3268
public fun setImportantForAccessibility (Landroid/view/View;Ljava/lang/String;)V
3269
+
public fun setMaskImage (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3270
+
public fun setMaskPosition (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3271
+
public fun setMaskRepeat (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3272
+
public fun setMaskSize (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
3263
3273
public fun setMixBlendMode (Landroid/view/View;Ljava/lang/String;)V
3264
3274
public fun setMoveShouldSetResponder (Landroid/view/View;Z)V
3265
3275
public fun setMoveShouldSetResponderCapture (Landroid/view/View;Z)V
@@ -4592,6 +4602,10 @@ public final class com/facebook/react/uimanager/ViewProps {
4592
4602
public static final field MARGIN_START Ljava/lang/String;
4593
4603
public static final field MARGIN_TOP Ljava/lang/String;
4594
4604
public static final field MARGIN_VERTICAL Ljava/lang/String;
4605
+
public static final field MASK_IMAGE Ljava/lang/String;
4606
+
public static final field MASK_POSITION Ljava/lang/String;
4607
+
public static final field MASK_REPEAT Ljava/lang/String;
4608
+
public static final field MASK_SIZE Ljava/lang/String;
4595
4609
public static final field MAX_FONT_SIZE_MULTIPLIER Ljava/lang/String;
4596
4610
public static final field MAX_HEIGHT Ljava/lang/String;
4597
4611
public static final field MAX_WIDTH Ljava/lang/String;
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/BackgroundStyleApplicator.kt
Copy file name to clipboardExpand all lines: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/CompositeBackgroundDrawable.kt
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,13 @@ internal class CompositeBackgroundDrawable(
58
58
59
59
// Holder value for currently set border radius
60
60
varborderRadius:BorderRadiusStyle? = null,
61
+
62
+
/**
63
+
* `mask-image` rendering layer. Unlike the layers above it is not part of the [LayerDrawable]
64
+
* stack: it is painted separately by [BackgroundStyleApplicator.beginMaskedDraw] to composite
65
+
* the view's own rendering, not to draw underneath it.
66
+
*/
67
+
valmask:BackgroundImageDrawable? = null,
61
68
) :
62
69
LayerDrawable(
63
70
createLayersArray(
@@ -77,6 +84,12 @@ internal class CompositeBackgroundDrawable(
77
84
// previous ones. E.g. an EditText style may set padding on a TextInput, but we don't want to
78
85
// constrain background color to the area inside of the padding.
79
86
setPaddingMode(LayerDrawable.PADDING_MODE_STACK)
87
+
88
+
// The mask is not one of our layers, so LayerDrawable does not adopt it. Routing its
89
+
// invalidations through us forwards them to the view, which lets asynchronously loaded
90
+
// `url()` masks repaint once they arrive. Re-parented on every copy so that the callback
91
+
// always points at the drawable the view actually holds.
92
+
mask?.callback =this
80
93
}
81
94
82
95
funwithNewBackgroundImage(
@@ -94,6 +107,7 @@ internal class CompositeBackgroundDrawable(
94
107
outline,
95
108
borderInsets,
96
109
borderRadius,
110
+
mask,
97
111
)
98
112
}
99
113
@@ -110,6 +124,7 @@ internal class CompositeBackgroundDrawable(
110
124
outline,
111
125
borderInsets,
112
126
borderRadius,
127
+
mask,
113
128
)
114
129
}
115
130
@@ -129,6 +144,7 @@ internal class CompositeBackgroundDrawable(
129
144
outline,
130
145
borderInsets,
131
146
borderRadius,
147
+
mask,
132
148
)
133
149
}
134
150
@@ -145,6 +161,7 @@ internal class CompositeBackgroundDrawable(
145
161
outline,
146
162
borderInsets,
147
163
borderRadius,
164
+
mask,
148
165
)
149
166
}
150
167
@@ -161,6 +178,24 @@ internal class CompositeBackgroundDrawable(
0 commit comments