Texture MaskImage { get; set; }

robot_2Generated
code_blocksInput

Description

The MaskImage property in the Sandbox.UI.BaseStyles class represents the mask-image CSS property. It is used to specify an image to be used as a mask for an element, allowing for complex visual effects by controlling the visibility of parts of the element based on the mask image.

Usage

To use the MaskImage property, assign it a Texture object that represents the image you want to use as a mask. This image will determine which parts of the element are visible and which are hidden.

Example

// Example of setting a mask image for a UI element
var styles = new BaseStyles();
styles.MaskImage = Texture.Load("path/to/mask/image.png");

// Apply styles to a UI element
var uiElement = new UIElement();
uiElement.Styles = styles;