FsScissor
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
| Member | Description |
|---|---|
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 m13m21 m22 m23m31 m32 m33 |
extent | Defines the size of the pattern using an array of two floats: [width, height]. |
use | If true, the drawing call will modify the clipping stencil. |
set | If true, the drawing call will use the current clipping stencil (if false, it will ignore it) |
mode | The clipmode to use. See the table below for details. |
Remarks
The “mode” member of the struct can take one of the following constants:
| Constant | Value | Description |
|---|---|---|
FS_CLIP_MODE_REPLACE | 0 | Specifies that the existing region is replaced by the new region. |
FS_CLIP_MODE_INTERSECT | 1 | Specifies that the existing region is replaced by the intersection of itself and the new region. |
FS_CLIP_MODE_UNION | 2 | Specifies that the existing region is replaced by the union of itself and the new region. |
FS_CLIP_MODE_XOR | 3 | 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. |
FS_CLIP_MODE_EXCLUDE | 4 | Specifies that the existing region is replaced by the portion of itself that is outside of the new region. |
FS_CLIP_MODE_COMPLEMENT | 5 | Specifies that the existing region is replaced by the portion of the new region that is outside of the existing region. |
