mirror of
https://github.com/godotengine/godot.git
synced 2024-12-14 07:04:05 +00:00
Documentation for AtlasTexture.
This commit is contained in:
parent
7f40734a1c
commit
b7a0a77f4f
@ -6390,8 +6390,11 @@
|
|||||||
</class>
|
</class>
|
||||||
<class name="AtlasTexture" inherits="Texture" category="Core">
|
<class name="AtlasTexture" inherits="Texture" category="Core">
|
||||||
<brief_description>
|
<brief_description>
|
||||||
|
Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
|
||||||
</brief_description>
|
</brief_description>
|
||||||
<description>
|
<description>
|
||||||
|
Texture resource aimed at managing big textures files that pack multiple smaller textures. Consists of a Texture, a margin that defines the border width, and a Region
|
||||||
|
that defines the actual area of the AtlasTexture.
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="get_atlas" qualifiers="const">
|
<method name="get_atlas" qualifiers="const">
|
||||||
@ -6439,10 +6442,13 @@
|
|||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas" brief="">
|
<member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas" brief="">
|
||||||
|
The texture that contains the atlas. Can be any Texture subtype.
|
||||||
</member>
|
</member>
|
||||||
<member name="margin" type="Rect2" setter="set_margin" getter="get_margin" brief="">
|
<member name="margin" type="Rect2" setter="set_margin" getter="get_margin" brief="">
|
||||||
|
The margin around the region. The Rect2's 'w' (width) and 'h' (height) resize the texture so it fits within the margin.
|
||||||
</member>
|
</member>
|
||||||
<member name="region" type="Rect2" setter="set_region" getter="get_region" brief="">
|
<member name="region" type="Rect2" setter="set_region" getter="get_region" brief="">
|
||||||
|
The AtlasTexture's used region.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
@ -50192,18 +50198,19 @@
|
|||||||
- Border width (individual width for each border)
|
- Border width (individual width for each border)
|
||||||
- Rounded corners (individual radius for each corner)
|
- Rounded corners (individual radius for each corner)
|
||||||
- Shadow
|
- Shadow
|
||||||
About corner radius:
|
|
||||||
Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example:
|
About corner radius:
|
||||||
[codeblock]
|
You may use high values for 'corner radius'. As soon as corners would overlap the stylebox will switch to a relative system. Example:
|
||||||
|
[codeblock]
|
||||||
height = 30
|
height = 30
|
||||||
corner_radius_top_left = 50
|
corner_radius_top_left = 50
|
||||||
corner_raidus_bottom_left = 100
|
corner_raidus_bottom_left = 100
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result:
|
The relative system now would take the 1:2 ratio of the two left corners to calculate the actual corner width. Both corners added will [b]never[/b] be more than the height. Result:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
corner_radius_top_left: 10
|
corner_radius_top_left: 10
|
||||||
corner_raidus_bottom_left: 20
|
corner_raidus_bottom_left: 20
|
||||||
[/codeblock]
|
[/codeblock]
|
||||||
</description>
|
</description>
|
||||||
<methods>
|
<methods>
|
||||||
<method name="get_aa_size" qualifiers="const">
|
<method name="get_aa_size" qualifiers="const">
|
||||||
|
Loading…
Reference in New Issue
Block a user