Nez.Portable/UI/Base/Element.cs
/// <summary>
/// Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's Batch. The
/// transform matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call
/// to clipEnd() if true is returned.
/// </summary>
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's Batch. The
transform matrix and the stage's camera must not have rotational components. Calling this method must be followed by a call
to clipEnd() if true is returned.
Clips the specified screen aligned rectangle specified relative to the transform matrix of the stage ' s Batch . The transform matrix and the stage ' s camera must not have rotational components . Calling this method must be followed by a call to clipEnd () if true is returned .
public bool clipBegin(Batcher batcher, float x, float y, float width, float height)
        {
            if (width <= 0 || height <= 0)
                return false;
            var tableBounds = RectangleExt.fromFloats(x, y, width, height);
            var scissorBounds = ScissorStack.calculateScissors(
                stage?.entity?.scene?.camera,
                batcher.transformMatrix,
                tableBounds);
            if (ScissorStack.pushScissors(scissorBounds))
            {
                batcher.enableScissorTest(true);
                return true;
            }
            return false;
        }
public bool clipBegin ( Batcher batcher , float x , float y , float width , float height ) { if ( width <= 0 || height <= 0 ) return false ; var tableBounds = RectangleExt . fromFloats ( x , y , width , height ) ; var scissorBounds = ScissorStack . calculateScissors ( stage ? . entity ? . scene ? . camera , batcher . transformMatrix , tableBounds ) ; if ( ScissorStack . pushScissors ( scissorBounds ) ) { batcher . enableScissorTest ( true ) ; return true ; } return false ; }
Clips the specified screen aligned rectangle, specified relative to the transform matrix of the stage's Batch.
Clips the specified screen aligned rectangle specified relative to the transform matrix of the stage ' s Batch .
batcher
Batcher
x
float
y
float
width
float
height
float