Inherits: StyleBox < Resource < RefCounted < Object
A texture-based nine-patch StyleBox.
A 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.
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
|
get_expand_margin ( Side margin ) const | |
get_texture_margin ( Side margin ) const | |
void | set_expand_margin ( Side margin, float size ) |
void | set_expand_margin_all ( float size ) |
void | set_texture_margin ( Side margin, float size ) |
void | set_texture_margin_all ( float size ) |
0
Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly.
1
Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system.
2
Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike AXIS_STRETCH_MODE_TILE, the texture may be slightly stretched to make the nine-patch texture tile seamlessly.
0
Controls how the stylebox's texture will be stretched or tiled horizontally. See AxisStretchMode for possible values.
0
Controls how the stylebox's texture will be stretched or tiled vertically. See AxisStretchMode for possible values.
true
If true, the nine-patch texture's center tile will be drawn.
0.0
Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested.
0.0
Expands the left margin of this style box when drawing, causing it to be drawn larger than requested.
0.0
Expands the right margin of this style box when drawing, causing it to be drawn larger than requested.
0.0
Expands the top margin of this style box when drawing, causing it to be drawn larger than requested.
Color(1, 1, 1, 1)
Modulates the color of the texture when this style box is drawn.
Rect2(0, 0, 0, 0)
Species a sub-region of the texture to use.
This is equivalent to first wrapping the texture in an AtlasTexture with the same region.
If empty (Rect2(0, 0, 0, 0)), the whole texture will be used.
The texture to use when drawing this style box.
0.0
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.content_margin_bottom if it is negative.
0.0
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.content_margin_left if it is negative.
0.0
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.content_margin_right if it is negative.
0.0
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.content_margin_top if it is negative.
Returns the expand margin size of the specified Side.
Returns the margin size of the specified Side.
Sets the expand margin to size pixels for the specified Side.
Sets the expand margin to size pixels for all sides.
Sets the margin to size pixels for the specified Side.
Sets the margin to size pixels for all sides.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_styleboxtexture.html