The FsScissor structure represents a rectangular region, potentially transformed, that can be used as a mask.

 

Syntax
struct FsScissor {
    float xform[6];
    float extent[2];
    bool use;
    bool set;
    FsClipMode mode;
};

 

Members
MemberDescription
xform

Defines the transformation of the pattern using an array of 6 floats: [ m11, m21, m12, m22, m13, m23 ].

This is a lightweight version of 3x3 transformation matrix. If you consider the following matrix:

m11 m12 m13

m21 m22 m23

m31 m32 m33

extentDefines the size of the pattern using an array of two floats: [width, height].
useIf true, the drawing call will modify the clipping stencil.
setIf true, the drawing call will use the current clipping stencil (if false, it will ignore it)
modeThe clipmode to use. See the table below for details.

 

Remarks

The “mode” member of the struct can take one of the following constants:

Constant

Description

ClipModeReplaceSpecifies that the existing region is replaced by the new region.
ClipModeIntersectSpecifies that the existing region is replaced by the intersection of itself and the new region.
ClipModeUnionSpecifies that the existing region is replaced by the union of itself and the new region.
ClipModeXor

Specifies that the existing region is replaced by the result of performing an XOR on the two regions. A point is in the XOR of two regions if it is in one region or the other but not in both regions.

NOTE: This mode is currently unsupported and should not be used.

ClipModeExcludeSpecifies that the existing region is replaced by the portion of itself that is outside of the new region.
ClipModeComplementSpecifies that the existing region is replaced by the portion of the new region that is outside of the existing region.