Struct StyleBoxTexture

Texture-based nine-patch StyleBox.

struct StyleBoxTexture ;

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.

Properties

NameTypeDescription
axisStretchHorizontal[get, set] StyleBoxTexture.AxisStretchModeControls how the stylebox's texture will be stretched or tiled horizontally. See axisstretchmode for possible values.
axisStretchVertical[get, set] StyleBoxTexture.AxisStretchModeControls how the stylebox's texture will be stretched or tiled vertically. See axisstretchmode for possible values.
drawCenter[get, set] boolIf true, the nine-patch texture's center tile will be drawn.
expandMarginBottom[get, set] doubleExpands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.
expandMarginLeft[get, set] doubleExpands the left margin of this style box when drawing, causing it to be drawn larger than requested.
expandMarginRight[get, set] doubleExpands the right margin of this style box when drawing, causing it to be drawn larger than requested.
expandMarginTop[get, set] doubleExpands the top margin of this style box when drawing, causing it to be drawn larger than requested.
marginBottom[get, set] doubleIncreases 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.
marginLeft[get, set] doubleIncreases 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.
marginRight[get, set] doubleIncreases 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.
marginTop[get, set] doubleIncreases 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.
modulateColor[get, set] ColorModulates the color of the texture when this style box is drawn.
normalMap[get, set] TextureThe normal map to use when drawing this style box.
regionRect[get, set] Rect2Species a sub-region of the texture to use. This is equivalent to first wrapping the texture in an AtlasTexture with the same region.
texture[get, set] TextureThe texture to use when drawing this style box.

Methods

NameDescription
getExpandMarginSize Returns the size of the given margin's expand margin. See margin for possible values.
getHAxisStretchMode
getMarginSize Returns the size of the given margin. See margin for possible values.
getModulate
getNormalMap
getRegionRect
getTexture
getVAxisStretchMode
isDrawCenterEnabled
setDrawCenter
setExpandMarginAll Sets the expand margin to size pixels for all margins.
setExpandMarginIndividual Sets the expand margin for each margin to size_left, size_top, size_right, and size_bottom pixels.
setExpandMarginSize Sets the expand margin to size pixels for the given margin. See margin for possible values.
setHAxisStretchMode
setMarginSize Sets the margin to size pixels for the given margin. See margin for possible values.
setModulate
setNormalMap
setRegionRect
setTexture
setVAxisStretchMode

Enums

NameDescription
AxisStretchMode
Constants