Texture-based nine-patch StyleBox.
    public class StyleBoxTexture : StyleBox

Texture-based nine-patch StyleBox, in a way similar to NinePatchRect. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox’s size.

Inheritance Chain

Constructors

    public StyleBoxTexture()

Signals

    "texture_changed" ()

Properties

    public AxisStretchMode AxisStretchHorizontal { get; set; }

    public AxisStretchMode AxisStretchVertical { get; set; }

    public bool DrawCenter { get; set; }

    public float ExpandMarginBottom { get; set; }

Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.

    public float ExpandMarginLeft { get; set; }

Expands the left margin of this style box when drawing, causing it to be drawn larger than requested.

    public float ExpandMarginRight { get; set; }

Expands the right margin of this style box when drawing, causing it to be drawn larger than requested.

    public float ExpandMarginTop { get; set; }

Expands the top margin of this style box when drawing, causing it to be drawn larger than requested.

    public float MarginBottom { get; set; }

Increases the bottom margin of the 3×3 texture box.

A higher value means more of the source texture is considered to be part of the bottom border of the 3×3 box.

This is also the value used as fallback for StyleBox.ContentMarginBottom if it is negative.

    public float MarginLeft { get; set; }

Increases the left margin of the 3×3 texture box.

A higher value means more of the source texture is considered to be part of the left border of the 3×3 box.

This is also the value used as fallback for StyleBox.ContentMarginLeft if it is negative.

    public float MarginRight { get; set; }

Increases the right margin of the 3×3 texture box.

A higher value means more of the source texture is considered to be part of the right border of the 3×3 box.

This is also the value used as fallback for StyleBox.ContentMarginRight if it is negative.

    public float MarginTop { get; set; }

Increases the top margin of the 3×3 texture box.

A higher value means more of the source texture is considered to be part of the top border of the 3×3 box.

This is also the value used as fallback for StyleBox.ContentMarginTop if it is negative.

    public Color ModulateColor { get; set; }

Modulates the color of the texture when this style box is drawn.

    public Texture NormalMap { get; set; }

The normal map to use when drawing this style box.

    public Rect2 RegionRect { get; set; }

Species a sub region of the texture to use.

This is equivalent to first wrapping the texture in an AtlasTexture with the same region.

    public Texture Texture { get; set; }

The texture to use when drawing this style box.

Methods

    [Obsolete("GetExpandMarginSize is deprecated. Use the ExpandMarginBottom property instead.")]
    public float GetExpandMarginSize(Margin margin)

    [Obsolete("GetHAxisStretchMode is deprecated. Use the AxisStretchHorizontal property instead.")]
    public AxisStretchMode GetHAxisStretchMode()

Getter for AxisStretchHorizontal

    [Obsolete("GetMarginSize is deprecated. Use the MarginBottom property instead.")]
    public float GetMarginSize(Margin margin)

    [Obsolete("GetModulate is deprecated. Use the ModulateColor property instead.")]
    public Color GetModulate()

Getter for ModulateColor

    [Obsolete("GetNormalMap is deprecated. Use the NormalMap property instead.")]
    public Texture GetNormalMap()

Getter for NormalMap

    [Obsolete("GetRegionRect is deprecated. Use the RegionRect property instead.")]
    public Rect2 GetRegionRect()

Getter for RegionRect

    [Obsolete("GetTexture is deprecated. Use the Texture property instead.")]
    public Texture GetTexture()

Getter for Texture

    [Obsolete("GetVAxisStretchMode is deprecated. Use the AxisStretchVertical property instead.")]
    public AxisStretchMode GetVAxisStretchMode()

Getter for AxisStretchVertical

    [Obsolete("IsDrawCenterEnabled is deprecated. Use the DrawCenter property instead.")]
    public bool IsDrawCenterEnabled()

Getter for DrawCenter

    [Obsolete("SetDrawCenter is deprecated. Use the DrawCenter property instead.")]
    public void SetDrawCenter(bool enable)

Setter for DrawCenter

    public void SetExpandMarginAll(float size)

    public void SetExpandMarginIndividual(float sizeLeft, float sizeTop, float sizeRight, float sizeBottom)

    [Obsolete("SetExpandMarginSize is deprecated. Use the ExpandMarginBottom property instead.")]
    public void SetExpandMarginSize(Margin margin, float size)

    [Obsolete("SetHAxisStretchMode is deprecated. Use the AxisStretchHorizontal property instead.")]
    public void SetHAxisStretchMode(AxisStretchMode mode)

Setter for AxisStretchHorizontal

    [Obsolete("SetMarginSize is deprecated. Use the MarginBottom property instead.")]
    public void SetMarginSize(Margin margin, float size)

    [Obsolete("SetModulate is deprecated. Use the ModulateColor property instead.")]
    public void SetModulate(Color color)

Setter for ModulateColor

    [Obsolete("SetNormalMap is deprecated. Use the NormalMap property instead.")]
    public void SetNormalMap(Texture normalMap)

Setter for NormalMap

    [Obsolete("SetRegionRect is deprecated. Use the RegionRect property instead.")]
    public void SetRegionRect(Rect2 region)

Setter for RegionRect

    [Obsolete("SetTexture is deprecated. Use the Texture property instead.")]
    public void SetTexture(Texture texture)

Setter for Texture

    [Obsolete("SetVAxisStretchMode is deprecated. Use the AxisStretchVertical property instead.")]
    public void SetVAxisStretchMode(AxisStretchMode mode)

Setter for AxisStretchVertical

Inner Types

AxisStretchMode

Name Value Description
Stretch 0  
Tile 1  
TileFit 2  
Tags: