Maskclass

An image mask positioned in drawing coordinates. Applied to the completed layer.

objectMask
Namespace
global
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.Painter.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)PUBLICCONSTRUCTOR

An image mask positioned in drawing coordinates. Applied to the completed layer.

ParameterTypeDescription
TextureTextureMask image. Must be non-null when used by a layer.
RectRectImage position and size in drawing coordinates. Must have finite, positive dimensions.
Mode = 1MaskModeWhether image alpha or luminance controls layer visibility. Defaults to alpha.
Repeat = 3BackgroundRepeatImage repetition outside the mask rectangle. Defaults to no repetition.
Rotation = 0floatRotation around the image center in degrees. Must be finite.
Sampling = 20FilterModeTexture sampling filter. Defaults to bilinear sampling.

Methods1

Showing 1 methods

Properties6

Showing 6 properties

public Sandbox.UI.MaskMode Sandbox.Painter.Mask.Mode { get; set; }PUBLICGETSET

Whether image alpha or luminance controls layer visibility. Defaults to alpha.

Returns:MaskMode

public Sandbox.Rect Sandbox.Painter.Mask.Rect { get; set; }PUBLICGETSET

Image position and size in drawing coordinates. Must have finite, positive dimensions.

Returns:Rect

public float Sandbox.Painter.Mask.Rotation { get; set; }PUBLICGETSET

Rotation around the image center in degrees. Must be finite.

Returns:float

public Sandbox.Rendering.FilterMode Sandbox.Painter.Mask.Sampling { get; set; }PUBLICGETSET

Texture sampling filter. Defaults to bilinear sampling.

Returns:FilterMode

On this page