Texture Reference
Texture references are similar to Asset References, the difference is that a texture reference can optionally accept a sample mode
operator.
As with Asset References, omitting the module name will resolve the texture against the current style file's module.
Sample modes define how the engine should treat the texture.
NineSlice
Apply border slicing to the imageLinearGradient
sample as linear gradientRadialGradient
sample as radial gradientEllipticalGradient
sample as an elliptical gradientConicGradient
sample as a conic gradientSoftMask
use this texture as a soft mask that handle partially transparent maskingHardMask
use this texture as hard mask where any pixel value less than 1f will mask away that valueSoftMaskInverse
same asSoftMask
but applies an invert operation before renderingHardMaskInverse
same asHardMask
but applies an invert operation before rendering
Examples
style sample-textures {
BackgroundImage = linear-gradient("gradientName");
BackgroundImage = linear-gradient("moduleName::gradientName");
BackgroundImage = radial-gradient("moduleName::gradientName");
BackgroundImage = ellipitcal-gradient("moduleName::gradientName");
BackgroundImage = conic-gradient("moduleName::gradientName");
BackgroundImage = soft-mask("moduleName::maskName");
BackgroundImage = soft-mask-inverse("moduleName::maskName");
BackgroundImage = hard-mask("maskName");
BackgroundImage = hard-mask-inverse("maskName");
BackgroundImage = nine-slice("moduleName::textureName");
BackgroundImage = "moduleName::textureName";
BackgroundImage = "textureName";
}