@@ -16,6 +16,7 @@ import android.graphics.drawable.LayerDrawable
16
16
import android.os.Build
17
17
import com.facebook.react.common.annotations.UnstableReactNativeAPI
18
18
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
19
+ import com.facebook.react.uimanager.PixelUtil.dpToPx
19
20
import com.facebook.react.uimanager.style.BorderInsets
20
21
import com.facebook.react.uimanager.style.BorderRadiusStyle
21
22
@@ -198,17 +199,17 @@ internal class CompositeBackgroundDrawable(
198
199
199
200
computedBorderRadius?.let {
200
201
pathForOutline.addRoundRect(
201
- RectF (bounds),
202
- floatArrayOf(
203
- it.topLeft.horizontal + (computedBorderInsets?.left ? : 0f ),
204
- it.topLeft.vertical + (computedBorderInsets?.top ? : 0f ),
205
- it.topRight.horizontal + (computedBorderInsets?.right ? : 0f ),
206
- it.topRight.vertical + (computedBorderInsets?.top ? : 0f ),
207
- it.bottomRight.horizontal + (computedBorderInsets?.right ? : 0f ),
208
- it.bottomRight.vertical + (computedBorderInsets?.bottom ? : 0f ),
209
- it.bottomLeft.horizontal + (computedBorderInsets?.left ? : 0f ),
210
- it.bottomLeft.vertical) + (computedBorderInsets?.bottom ? : 0f ),
211
- Path .Direction .CW )
202
+ RectF (bounds),
203
+ floatArrayOf(
204
+ ( it.topLeft.horizontal + (computedBorderInsets?.left ? : 0f )).dpToPx( ),
205
+ ( it.topLeft.vertical + (computedBorderInsets?.top ? : 0f )).dpToPx( ),
206
+ ( it.topRight.horizontal + (computedBorderInsets?.right ? : 0f )).dpToPx( ),
207
+ ( it.topRight.vertical + (computedBorderInsets?.top ? : 0f )).dpToPx( ),
208
+ ( it.bottomRight.horizontal + (computedBorderInsets?.right ? : 0f )).dpToPx( ),
209
+ ( it.bottomRight.vertical + (computedBorderInsets?.bottom ? : 0f )).dpToPx( ),
210
+ ( it.bottomLeft.horizontal + (computedBorderInsets?.left ? : 0f )).dpToPx( ),
211
+ ( it.bottomLeft.vertical + (computedBorderInsets?.bottom ? : 0f )).dpToPx() ),
212
+ Path .Direction .CW )
212
213
}
213
214
214
215
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .R ) {
0 commit comments