2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2020-02-12 09:59:06 +01:00
<class name= "ImageTexture" inherits= "Texture2D" version= "4.0" >
2017-09-12 22:42:36 +02:00
<brief_description >
2020-02-12 09:59:06 +01:00
A [Texture2D] based on an [Image].
2017-09-12 22:42:36 +02:00
</brief_description>
<description >
2020-02-12 09:59:06 +01:00
A [Texture2D] based on an [Image]. Can be created from an [Image] with [method create_from_image].
2020-04-17 16:04:32 +02: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-12 22:42:36 +02: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 09:59:06 +01:00
Create a new [ImageTexture] from an [Image].
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "get_format" qualifiers= "const" >
<return type= "int" enum= "Image.Format" >
</return>
<description >
2019-05-24 04:15:43 +02:00
Returns the format of the [ImageTexture], one of [enum Image.Format].
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-02-12 09:59:06 +01:00
<method name= "set_size_override" >
<return type= "void" >
2017-09-12 22:42:36 +02:00
</return>
2020-02-12 09:59:06 +01:00
<argument index= "0" name= "size" type= "Vector2" >
2017-09-12 22:42:36 +02:00
</argument>
<description >
2020-02-12 09:59:06 +01:00
Resizes the [ImageTexture] to the specified dimensions.
2017-09-12 22:42:36 +02:00
</description>
</method>
2020-02-12 09:59:06 +01:00
<method name= "update" >
2017-09-12 22:42:36 +02:00
<return type= "void" >
</return>
<argument index= "0" name= "image" type= "Image" >
</argument>
2020-02-12 09:59:06 +01:00
<argument index= "1" name= "immediate" type= "bool" default= "false" >
2017-09-12 22:42:36 +02:00
</argument>
<description >
2020-03-03 19:21:21 +01: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-12 22:42:36 +02:00
</description>
</method>
</methods>
<constants >
</constants>
</class>