mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Support rounded clipping
Summary: Support rounded clipping in Nodes. Before, if a view had a radius and had overflow of hidden, its children could still draw outside of it (specifically, in the area between the rounded rect and square rect) - this is due to the fact that clipping is, by default, rectangular. This patch supports this type of rounded clipping. Differential Revision: D3634861
This commit is contained in:
@@ -75,7 +75,7 @@ import android.graphics.Color;
|
||||
return mClipBottom;
|
||||
}
|
||||
|
||||
protected final void applyClipping(Canvas canvas) {
|
||||
protected void applyClipping(Canvas canvas) {
|
||||
canvas.clipRect(mClipLeft, mClipTop, mClipRight, mClipBottom);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user