API Referenceglobal
Maskclass
An image mask positioned in drawing coordinates. Applied to the completed layer.
object→Mask
Constructors1
Showing 1 constructors
public Mask(Sandbox.Texture Texture, Sandbox.Rect Rect, Sandbox.UI.MaskMode Mode = 1, Sandbox.UI.BackgroundRepeat Repeat = 3, float Rotation = 0, Sandbox.Rendering.FilterMode Sampling = 20)
An image mask positioned in drawing coordinates. Applied to the completed layer.
| Parameter | Type | Description |
|---|---|---|
| Texture | Texture | Mask image. Must be non-null when used by a layer. |
| Rect | Rect | Image position and size in drawing coordinates. Must have finite, positive dimensions. |
| Mode = 1 | MaskMode | Whether image alpha or luminance controls layer visibility. Defaults to alpha. |
| Repeat = 3 | BackgroundRepeat | Image repetition outside the mask rectangle. Defaults to no repetition. |
| Rotation = 0 | float | Rotation around the image center in degrees. Must be finite. |
| Sampling = 20 | FilterMode | Texture sampling filter. Defaults to bilinear sampling. |
No results match this filter.
Methods1
Showing 1 methods
public void Deconstruct(Sandbox.Texture Texture, Sandbox.Rect Rect, Sandbox.UI.MaskMode Mode, Sandbox.UI.BackgroundRepeat Repeat, float Rotation, Sandbox.Rendering.FilterMode Sampling)
| Parameter | Type | Description |
|---|---|---|
| Texture | Texture | — |
| Rect | Rect | — |
| Mode | MaskMode | — |
| Repeat | BackgroundRepeat | — |
| Rotation | float | — |
| Sampling | FilterMode | — |
Returns:
void—No results match this filter.
Properties6
Showing 6 properties
public Sandbox.UI.MaskMode Sandbox.Painter.Mask.Mode { get; set; }
Whether image alpha or luminance controls layer visibility. Defaults to alpha.
public Sandbox.Rect Sandbox.Painter.Mask.Rect { get; set; }
Image position and size in drawing coordinates. Must have finite, positive dimensions.
public Sandbox.UI.BackgroundRepeat Sandbox.Painter.Mask.Repeat { get; set; }
Image repetition outside the mask rectangle. Defaults to no repetition.
public float Sandbox.Painter.Mask.Rotation { get; set; }
Rotation around the image center in degrees. Must be finite.
Returns:
float—No results match this filter.