2017-09-12 22:42:36 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2017-11-24 09:16:52 +01:00
|
|
|
<class name="ImageTexture" inherits="Texture" category="Core" version="3.0-beta">
|
2017-09-12 22:42:36 +02:00
|
|
|
<brief_description>
|
|
|
|
A [Texture] based on an [Image].
|
|
|
|
</brief_description>
|
|
|
|
<description>
|
2017-10-09 12:49:12 +02:00
|
|
|
A [Texture] based on an [Image]. Can be created from an [Image] with [method create_from_image].
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
<tutorials>
|
|
|
|
</tutorials>
|
|
|
|
<demos>
|
|
|
|
</demos>
|
|
|
|
<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>
|
2017-10-22 12:56:11 +02:00
|
|
|
Create a new [code]ImageTexture[/code] with "width" and "height".
|
2017-09-12 22:42:36 +02:00
|
|
|
"format" one of [Image].FORMAT_*.
|
|
|
|
"flags" one or more of [Texture].FLAG_*.
|
|
|
|
</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>
|
2017-10-22 12:56:11 +02:00
|
|
|
Create a new [code]ImageTexture[/code] from an [Image] with "flags" from [Texture].FLAG_*.
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_format" qualifiers="const">
|
|
|
|
<return type="int" enum="Image.Format">
|
|
|
|
</return>
|
|
|
|
<description>
|
2017-10-22 12:56:11 +02:00
|
|
|
Return the format of the [code]ImageTexture[/code], one of [Image].FORMAT_*.
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_lossy_storage_quality" qualifiers="const">
|
|
|
|
<return type="float">
|
|
|
|
</return>
|
|
|
|
<description>
|
2017-10-22 12:56:11 +02:00
|
|
|
Return the storage quality for [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY.
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="get_storage" qualifiers="const">
|
|
|
|
<return type="int" enum="ImageTexture.Storage">
|
|
|
|
</return>
|
|
|
|
<description>
|
2017-10-22 12:56:11 +02:00
|
|
|
Return the storage type. One of [code]ImageTexture[/code].STORAGE_*.
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="load">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="path" type="String">
|
|
|
|
</argument>
|
|
|
|
<description>
|
2017-10-22 12:56:11 +02:00
|
|
|
Load an [code]ImageTexture[/code].
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_data">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="image" type="Image">
|
|
|
|
</argument>
|
|
|
|
<description>
|
2017-10-22 12:56:11 +02:00
|
|
|
Set the [Image] of this [code]ImageTexture[/code].
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_lossy_storage_quality">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="quality" type="float">
|
|
|
|
</argument>
|
|
|
|
<description>
|
2017-10-22 12:56:11 +02:00
|
|
|
Set the storage quality in case of [code]ImageTexture[/code].STORAGE_COMPRESS_LOSSY.
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_size_override">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="size" type="Vector2">
|
|
|
|
</argument>
|
|
|
|
<description>
|
2017-10-09 12:49:12 +02:00
|
|
|
Resizes the [code]ImageTexture[/code] to the specified dimensions.
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
<method name="set_storage">
|
|
|
|
<return type="void">
|
|
|
|
</return>
|
|
|
|
<argument index="0" name="mode" type="int" enum="ImageTexture.Storage">
|
|
|
|
</argument>
|
|
|
|
<description>
|
2017-10-22 12:56:11 +02:00
|
|
|
Set the storage type. One of [code]ImageTexture[/code].STORAGE_*.
|
2017-09-12 22:42:36 +02:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
</methods>
|
|
|
|
<constants>
|
2017-11-24 23:16:30 +01:00
|
|
|
<constant name="STORAGE_RAW" value="0" enum="Storage">
|
2017-09-12 22:42:36 +02:00
|
|
|
[Image] data is stored raw and unaltered.
|
|
|
|
</constant>
|
2017-11-24 23:16:30 +01:00
|
|
|
<constant name="STORAGE_COMPRESS_LOSSY" value="1" enum="Storage">
|
2017-09-12 22:42:36 +02:00
|
|
|
[Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality].
|
|
|
|
</constant>
|
2017-11-24 23:16:30 +01:00
|
|
|
<constant name="STORAGE_COMPRESS_LOSSLESS" value="2" enum="Storage">
|
2017-09-12 22:42:36 +02:00
|
|
|
[Image] data is compressed with a lossless algorithm.
|
|
|
|
</constant>
|
|
|
|
</constants>
|
|
|
|
</class>
|