mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Implement clipping rectangle for ReactNativeART
Reviewed By: sebmarkbage, taomin Differential Revision: D3140869 fb-gh-sync-id: 0da27705c4cfca7a1fcae12eed11a7335a62631f fbshipit-source-id: 0da27705c4cfca7a1fcae12eed11a7335a62631f
This commit is contained in:
committed by
Facebook Github Bot 5
parent
0b534d1c3d
commit
24f03af0c3
@@ -227,13 +227,7 @@ var ClippingRectangle = React.createClass({
|
||||
var y = extractNumber(props.y, 0);
|
||||
var w = extractNumber(props.width, 0);
|
||||
var h = extractNumber(props.height, 0);
|
||||
var clipping = new Path()
|
||||
.moveTo(x, y)
|
||||
.line(w, 0)
|
||||
.line(0, h)
|
||||
.line(w, 0)
|
||||
.close()
|
||||
.toJSON();
|
||||
var clipping = [x, y, w, h];
|
||||
// The current clipping API requires x and y to be ignored in the transform
|
||||
var propsExcludingXAndY = merge(props);
|
||||
delete propsExcludingXAndY.x;
|
||||
|
||||
Reference in New Issue
Block a user