mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
fix: masked element layer opacity when previous item has stroke opacity (#2456)
# Summary On Android when element before masked element has strokeOpacity different from 1, the paint is reused to draw an offscreen layer resulting in wrong opacity. Partially fixes (only on Android) #2449 ## Test Plan Add `stroke` and `strokeOpacity` to element directly before masked element. ## Compatibility | OS | Implemented | | ------- | :---------: | | Android | ✅ |
This commit is contained in:
@@ -377,7 +377,7 @@ public abstract class RenderableView extends VirtualView implements ReactHitSlop
|
||||
canvas.drawBitmap(elementBitmap, 0, 0, bitmapPaint);
|
||||
canvas.restoreToCount(saveCount);
|
||||
} else {
|
||||
canvas.saveLayer(null, paint);
|
||||
canvas.saveLayer(null, new Paint());
|
||||
draw(canvas, paint, opacity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user