2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-02-12 16:59:06 +08:00
<class name= "ImageTexture" inherits= "Texture2D" version= "4.0" >
2017-09-13 04:42:36 +08:00
<brief_description >
2020-02-12 16:59:06 +08:00
A [Texture2D] based on an [Image].
2017-09-13 04:42:36 +08:00
</brief_description>
<description >
2020-02-12 16:59:06 +08:00
A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image].
2020-04-17 22:04:32 +08:00
[b]Note:[/b] The maximum image size is 16384× 16384 pixels due to graphics hardware limitations. Larger images will fail to import.
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "create_from_image" >
<return type= "void" >
</return>
<argument index= "0" name= "image" type= "Image" >
</argument>
<description >
2020-02-12 16:59:06 +08:00
Create a new [ImageTexture] from an [Image].
2017-09-13 04:42:36 +08:00
</description>
</method>
<method name= "get_format" qualifiers= "const" >
<return type= "int" enum= "Image.Format" >
</return>
<description >
2019-05-24 10:15:43 +08:00
Returns the format of the [ImageTexture], one of [enum Image.Format].
2017-09-13 04:42:36 +08:00
</description>
</method>
2020-02-12 16:59:06 +08:00
<method name= "set_size_override" >
<return type= "void" >
2017-09-13 04:42:36 +08:00
</return>
2020-02-12 16:59:06 +08:00
<argument index= "0" name= "size" type= "Vector2" >
2017-09-13 04:42:36 +08:00
</argument>
<description >
2020-02-12 16:59:06 +08:00
Resizes the [ImageTexture] to the specified dimensions.
2017-09-13 04:42:36 +08:00
</description>
</method>
2020-02-12 16:59:06 +08:00
<method name= "update" >
2017-09-13 04:42:36 +08:00
<return type= "void" >
</return>
<argument index= "0" name= "image" type= "Image" >
</argument>
2020-02-12 16:59:06 +08:00
<argument index= "1" name= "immediate" type= "bool" default= "false" >
2017-09-13 04:42:36 +08:00
</argument>
<description >
2020-03-04 02:21:21 +08:00
Replaces the texture's data with a new [code]image[/code]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call.
2017-09-13 04:42:36 +08:00
</description>
</method>
</methods>
<constants >
</constants>
</class>