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
| Name | Type | Description |
|---|---|---|
axisStretchHorizontal[get, set]
|
StyleBoxTexture | Controls how the stylebox's texture will be stretched or tiled horizontally. See axisstretchmode for possible values.
|
axisStretchVertical[get, set]
|
StyleBoxTexture | Controls how the stylebox's texture will be stretched or tiled vertically. See axisstretchmode for possible values.
|
drawCenter[get, set]
|
bool | If true, the nine-patch texture's center tile will be drawn.
|
expandMarginBottom[get, set]
|
double | Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. |
expandMarginLeft[get, set]
|
double | Expands the left margin of this style box when drawing, causing it to be drawn larger than requested. |
expandMarginRight[get, set]
|
double | Expands the right margin of this style box when drawing, causing it to be drawn larger than requested. |
expandMarginTop[get, set]
|
double | Expands the top margin of this style box when drawing, causing it to be drawn larger than requested. |
marginBottom[get, set]
|
double | 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 if it is negative.
|
marginLeft[get, set]
|
double | 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 if it is negative.
|
marginRight[get, set]
|
double | 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 if it is negative.
|
marginTop[get, set]
|
double | 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 if it is negative.
|
modulateColor[get, set]
|
Color | Modulates the color of the texture when this style box is drawn. |
normalMap[get, set]
|
Texture | The normal map to use when drawing this style box. |
regionRect[get, set]
|
Rect2 | Species 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]
|
Texture | The texture to use when drawing this style box. |
Methods
| Name | Description |
|---|---|
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
| Name | Description |
|---|---|
AxisStretchMode
|
|
Constants
|