Texture-based nine-patch godot.StyleBox
, in a way similar to godot.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.
Constructor
Variables
axisStretchHorizontal:StyleBoxTexture_AxisStretchMode
Controls how the stylebox's texture will be stretched or tiled horizontally. See godot.StyleBoxTexture_AxisStretchMode
for possible values.
axisStretchVertical:StyleBoxTexture_AxisStretchMode
Controls how the stylebox's texture will be stretched or tiled vertically. See godot.StyleBoxTexture_AxisStretchMode
for possible values.
expandMarginBottom:Single
Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.
expandMarginLeft:Single
Expands the left margin of this style box when drawing, causing it to be drawn larger than requested.
expandMarginRight:Single
Expands the right margin of this style box when drawing, causing it to be drawn larger than requested.
expandMarginTop:Single
Expands the top margin of this style box when drawing, causing it to be drawn larger than requested.
marginBottom:Single
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 godot.StyleBox.contentMarginBottom
if it is negative.
marginLeft:Single
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 godot.StyleBox.contentMarginLeft
if it is negative.
marginRight:Single
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 godot.StyleBox.contentMarginRight
if it is negative.
marginTop:Single
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 godot.StyleBox.contentMarginTop
if it is negative.
normalMap:Texture
The normal map to use when drawing this style box.
Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See [http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates](this page) for a comparison of normal map coordinates expected by popular engines.
regionRect:Rect2
Species a sub-region of the texture to use.
This is equivalent to first wrapping the texture in an godot.AtlasTexture
with the same region.
Methods
getExpandMarginSize(margin:Margin):Single
Returns the size of the given margin
's expand margin. See godot.Margin
for possible values.
getMarginSize(margin:Margin):Single
Returns the size of the given margin
. See godot.Margin
for possible values.
setExpandMarginIndividual(sizeLeft:Single, sizeTop:Single, sizeRight:Single, sizeBottom:Single):Void
Sets the expand margin for each margin to size_left
, size_top
, size_right
, and size_bottom
pixels.
setExpandMarginSize(margin:Margin, size:Single):Void
Sets the expand margin to size
pixels for the given margin
. See godot.Margin
for possible values.
setMarginSize(margin:Margin, size:Single):Void
Sets the margin to size
pixels for the given margin
. See godot.Margin
for possible values.