summaryrefslogtreecommitdiff
path: root/doc/classes/Texture.xml
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-01-26 10:08:55 +0100
committerGitHub <noreply@github.com>2020-01-26 10:08:55 +0100
commit6a5c8c867281fb3ed13cce1e7d9acf287161bc03 (patch)
treef89afe043a4f965f401d12cfab94f3a2340f7012 /doc/classes/Texture.xml
parent1b3eb416229567596a7db53bf927e9daf61bac4a (diff)
parentc5700f74648d8b04229f4d4c77937c1af3a798a7 (diff)
Merge pull request #35574 from clayjohn/DOCS-odds-n-ends
Complete various class references
Diffstat (limited to 'doc/classes/Texture.xml')
-rw-r--r--doc/classes/Texture.xml8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml
index 238d6929ba..05ceb1cd29 100644
--- a/doc/classes/Texture.xml
+++ b/doc/classes/Texture.xml
@@ -6,6 +6,7 @@
<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>