summaryrefslogtreecommitdiff
path: root/doc/classes/ImageTexture.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/ImageTexture.xml')
-rw-r--r--doc/classes/ImageTexture.xml64
1 files changed, 10 insertions, 54 deletions
diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml
index 7e3e818773..98eb42831b 100644
--- a/doc/classes/ImageTexture.xml
+++ b/doc/classes/ImageTexture.xml
@@ -1,39 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="ImageTexture" inherits="Texture" version="4.0">
+<class name="ImageTexture" inherits="Texture2D" version="4.0">
<brief_description>
- A [Texture] based on an [Image].
+ A [Texture2D] based on an [Image].
</brief_description>
<description>
- A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image].
+ A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image].
</description>
<tutorials>
</tutorials>
<methods>
- <method name="create">
- <return type="void">
- </return>
- <argument index="0" name="width" type="int">
- </argument>
- <argument index="1" name="height" type="int">
- </argument>
- <argument index="2" name="format" type="int" enum="Image.Format">
- </argument>
- <argument index="3" name="flags" type="int" default="7">
- </argument>
- <description>
- Create a new [ImageTexture] with [code]width[/code] and [code]height[/code].
- [code]format[/code] is a value from [enum Image.Format], [code]flags[/code] is any combination of [enum Texture.Flags].
- </description>
- </method>
<method name="create_from_image">
<return type="void">
</return>
<argument index="0" name="image" type="Image">
</argument>
- <argument index="1" name="flags" type="int" default="7">
- </argument>
<description>
- Create a new [ImageTexture] from an [Image] with [code]flags[/code] from [enum Texture.Flags]. An sRGB to linear color space conversion can take place, according to [enum Image.Format].
+ Create a new [ImageTexture] from an [Image].
</description>
</method>
<method name="get_format" qualifiers="const">
@@ -43,52 +25,26 @@
Returns the format of the [ImageTexture], one of [enum Image.Format].
</description>
</method>
- <method name="load">
- <return type="int" enum="Error">
+ <method name="set_size_override">
+ <return type="void">
</return>
- <argument index="0" name="path" type="String">
+ <argument index="0" name="size" type="Vector2">
</argument>
<description>
- Load an [ImageTexture] from a file path.
+ Resizes the [ImageTexture] to the specified dimensions.
</description>
</method>
- <method name="set_data">
+ <method name="update">
<return type="void">
</return>
<argument index="0" name="image" type="Image">
</argument>
- <description>
- Sets the [Image] of this [ImageTexture].
- </description>
- </method>
- <method name="set_size_override">
- <return type="void">
- </return>
- <argument index="0" name="size" type="Vector2">
+ <argument index="1" name="immediate" type="bool" default="false">
</argument>
<description>
- Resizes the [ImageTexture] to the specified dimensions.
</description>
</method>
</methods>
- <members>
- <member name="flags" type="int" setter="set_flags" getter="get_flags" override="true" default="7" />
- <member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7">
- The storage quality for [constant STORAGE_COMPRESS_LOSSY].
- </member>
- <member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage" default="0">
- The storage type (raw, lossy, or compressed).
- </member>
- </members>
<constants>
- <constant name="STORAGE_RAW" value="0" enum="Storage">
- [Image] data is stored raw and unaltered.
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage">
- [Image] data is compressed with a lossy algorithm. You can set the storage quality with [member lossy_quality].
- </constant>
- <constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage">
- [Image] data is compressed with a lossless algorithm.
- </constant>
</constants>
</class>