summaryrefslogtreecommitdiff
path: root/doc/classes/Texture.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Texture.xml')
-rw-r--r--doc/classes/Texture.xml10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index 238d6929ba..b0d379f6d0 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture" inherits="Resource" category="Core" version="3.2">
+<class name="Texture" inherits="Resource" version="3.2">
<brief_description>
Texture for 2D and 3D.
</brief_description>
<description>
A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control].
Textures are often created by loading them from a file. See [method @GDScript.load].
+ [Texture] is a base for other resources. It cannot be used directly.
</description>
<tutorials>
</tutorials>
@@ -24,6 +25,7 @@
<argument index="4" name="normal_map" type="Texture" default="null">
</argument>
<description>
+ Draws the texture using a [CanvasItem] with the [VisualServer] API at the specified [code]position[/code]. Equivalent to [method VisualServer.canvas_item_add_texture_rect] with a rect at [code]position[/code] and the size of this [Texture].
</description>
</method>
<method name="draw_rect" qualifiers="const">
@@ -42,6 +44,7 @@
<argument index="5" name="normal_map" type="Texture" default="null">
</argument>
<description>
+ Draws the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect].
</description>
</method>
<method name="draw_rect_region" qualifiers="const">
@@ -62,12 +65,14 @@
<argument index="6" name="clip_uv" type="bool" default="true">
</argument>
<description>
+ Draws a part of the texture using a [CanvasItem] with the [VisualServer] API. Equivalent to [method VisualServer.canvas_item_add_texture_rect_region].
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="Image">
</return>
<description>
+ Returns an [Image] with the data from this [Texture]. [Image]s can be accessed and manipulated directly.
</description>
</method>
<method name="get_height" qualifiers="const">
@@ -95,12 +100,13 @@
<return type="bool">
</return>
<description>
+ Returns [code]true[/code] if this [Texture] has an alpha channel.
</description>
</method>
</methods>
<members>
<member name="flags" type="int" setter="set_flags" getter="get_flags" default="4">
- The texture's flags.
+ The texture's [enum Flags]. [enum Flags] are used to set various properties of the [Texture].
</member>
</members>
<constants>