Classref for: ImageTexture, Image, LargeTexture

(cherry picked from commit ec96e36bc9)
This commit is contained in:
J08nY 2016-06-07 12:17:18 +02:00 committed by Rémi Verschelde
parent 74d0f8b65b
commit d16375d005
1 changed files with 52 additions and 0 deletions

View File

@ -13916,6 +13916,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="dest" type="Vector2" default="0"> <argument index="2" name="dest" type="Vector2" default="0">
</argument> </argument>
<description> <description>
Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
</description> </description>
</method> </method>
<method name="brush_transfer"> <method name="brush_transfer">
@ -13926,6 +13927,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="pos" type="Vector2" default="0"> <argument index="2" name="pos" type="Vector2" default="0">
</argument> </argument>
<description> <description>
Transfer data from "src" to this [Image] using a "brush" as a mask/brush on coordinates "pos".
</description> </description>
</method> </method>
<method name="brushed"> <method name="brushed">
@ -13938,6 +13940,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="pos" type="Vector2" default="0"> <argument index="2" name="pos" type="Vector2" default="0">
</argument> </argument>
<description> <description>
Return a new [Image] from this [Image] that is created by brushhing see [method brush_transfer].
</description> </description>
</method> </method>
<method name="compressed"> <method name="compressed">
@ -13946,6 +13949,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="format" type="int" default="0"> <argument index="0" name="format" type="int" default="0">
</argument> </argument>
<description> <description>
Return a new compressed [Image] from this [Image] using one of [Image].COMPRESS_*.
</description> </description>
</method> </method>
<method name="converted"> <method name="converted">
@ -13954,18 +13958,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="format" type="int" default="0"> <argument index="0" name="format" type="int" default="0">
</argument> </argument>
<description> <description>
Return a new [Image] from this [Image] with a different format.
</description> </description>
</method> </method>
<method name="decompressed"> <method name="decompressed">
<return type="Image"> <return type="Image">
</return> </return>
<description> <description>
Return a new decompressed [Image].
</description> </description>
</method> </method>
<method name="empty"> <method name="empty">
<return type="bool"> <return type="bool">
</return> </return>
<description> <description>
Return whether this [Image] is empty(no data).
</description> </description>
</method> </method>
<method name="fix_alpha_edges"> <method name="fix_alpha_edges">
@ -13976,18 +13983,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="RawArray"> <return type="RawArray">
</return> </return>
<description> <description>
Return the raw data of the [Image].
</description> </description>
</method> </method>
<method name="get_format"> <method name="get_format">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the format of the [Image], one of [Image].FORMAT_*.
</description> </description>
</method> </method>
<method name="get_height"> <method name="get_height">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the height of the [Image].
</description> </description>
</method> </method>
<method name="get_pixel"> <method name="get_pixel">
@ -14000,6 +14010,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="mipmap_level" type="int" default="0"> <argument index="2" name="mipmap_level" type="int" default="0">
</argument> </argument>
<description> <description>
Return the color of the pixel in the [Image] on coordinates "x,y" on mipmap level "mipmap_level".
</description> </description>
</method> </method>
<method name="get_rect"> <method name="get_rect">
@ -14008,18 +14019,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="area" type="Rect2" default="0"> <argument index="0" name="area" type="Rect2" default="0">
</argument> </argument>
<description> <description>
Return a new [Image] that is a copy of "area" in this [Image].
</description> </description>
</method> </method>
<method name="get_used_rect"> <method name="get_used_rect">
<return type="Rect2"> <return type="Rect2">
</return> </return>
<description> <description>
Return the area of this [Image] that is used/visibly colored/opaque.
</description> </description>
</method> </method>
<method name="get_width"> <method name="get_width">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the width of the [Image].
</description> </description>
</method> </method>
<method name="load"> <method name="load">
@ -14028,6 +14042,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="path" type="String" default="0"> <argument index="0" name="path" type="String" default="0">
</argument> </argument>
<description> <description>
Load an [Image].
</description> </description>
</method> </method>
<method name="put_pixel"> <method name="put_pixel">
@ -14040,6 +14055,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="mipmap_level" type="int" default="0"> <argument index="3" name="mipmap_level" type="int" default="0">
</argument> </argument>
<description> <description>
Put a pixel of "color" on coordinates "x,y" on mipmap level "mipmap_level".
</description> </description>
</method> </method>
<method name="resized"> <method name="resized">
@ -14052,6 +14068,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="2" name="interpolation" type="int" default="1"> <argument index="2" name="interpolation" type="int" default="1">
</argument> </argument>
<description> <description>
Return a new [Image] from this [Image] that is resized to size "x,y" using [Image].INTERPOLATE_*.
</description> </description>
</method> </method>
<method name="save_png"> <method name="save_png">
@ -14060,6 +14077,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="path" type="String" default="0"> <argument index="0" name="path" type="String" default="0">
</argument> </argument>
<description> <description>
Save this [Image] as a png.
</description> </description>
</method> </method>
<method name="Image"> <method name="Image">
@ -14133,12 +14151,20 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</constant> </constant>
<constant name="FORMAT_CUSTOM" value="22"> <constant name="FORMAT_CUSTOM" value="22">
</constant> </constant>
<constant name="INTERPOLATE_NEAREST" value="0">
</constant>
<constant name="INTERPOLATE_BILINEAR" value="1">
</constant>
<constant name="INTERPOLATE_CUBIC" value="2">
</constant>
</constants> </constants>
</class> </class>
<class name="ImageTexture" inherits="Texture" category="Core"> <class name="ImageTexture" inherits="Texture" category="Core">
<brief_description> <brief_description>
A [Texture] based on an [Image].
</brief_description> </brief_description>
<description> <description>
A [Texture] based on an [Image]. Can be created from an [Image].
</description> </description>
<methods> <methods>
<method name="create"> <method name="create">
@ -14151,6 +14177,9 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="3" name="flags" type="int" default="7"> <argument index="3" name="flags" type="int" default="7">
</argument> </argument>
<description> <description>
Create a new [ImageTexture] with "width" and "height".
"format" one of [Image].FORMAT_*.
"flags" one or more of [Texture].FLAG_*.
</description> </description>
</method> </method>
<method name="create_from_image"> <method name="create_from_image">
@ -14159,54 +14188,63 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="flags" type="int" default="7"> <argument index="1" name="flags" type="int" default="7">
</argument> </argument>
<description> <description>
Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
</description> </description>
</method> </method>
<method name="get_format" qualifiers="const"> <method name="get_format" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the format of the [ImageTexture], one of [Image].FORMAT_*.
</description> </description>
</method> </method>
<method name="load"> <method name="load">
<argument index="0" name="path" type="String"> <argument index="0" name="path" type="String">
</argument> </argument>
<description> <description>
Load an [ImageTexure].
</description> </description>
</method> </method>
<method name="set_data"> <method name="set_data">
<argument index="0" name="image" type="Image"> <argument index="0" name="image" type="Image">
</argument> </argument>
<description> <description>
Set the [Image] of this [ImageTexture].
</description> </description>
</method> </method>
<method name="get_data" qualifiers="const"> <method name="get_data" qualifiers="const">
<return type="Image"> <return type="Image">
</return> </return>
<description> <description>
Return the [Image] of this [ImageTexture].
</description> </description>
</method> </method>
<method name="set_storage"> <method name="set_storage">
<argument index="0" name="mode" type="int"> <argument index="0" name="mode" type="int">
</argument> </argument>
<description> <description>
Set the storage type. One of [ImageTexture].STORAGE_*.
</description> </description>
</method> </method>
<method name="get_storage" qualifiers="const"> <method name="get_storage" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the storage type. One of [ImageTexture].STORAGE_*.
</description> </description>
</method> </method>
<method name="set_lossy_storage_quality"> <method name="set_lossy_storage_quality">
<argument index="0" name="quality" type="float"> <argument index="0" name="quality" type="float">
</argument> </argument>
<description> <description>
Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY.
</description> </description>
</method> </method>
<method name="get_lossy_storage_quality" qualifiers="const"> <method name="get_lossy_storage_quality" qualifiers="const">
<return type="float"> <return type="float">
</return> </return>
<description> <description>
Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY.
</description> </description>
</method> </method>
<method name="fix_alpha_edges"> <method name="fix_alpha_edges">
@ -14234,10 +14272,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</methods> </methods>
<constants> <constants>
<constant name="STORAGE_RAW" value="0"> <constant name="STORAGE_RAW" value="0">
[Image] data is stored raw and unaltered.
</constant> </constant>
<constant name="STORAGE_COMPRESS_LOSSY" value="1"> <constant name="STORAGE_COMPRESS_LOSSY" value="1">
[Image] data is compressed with a lossy algorithm. You can set the storage quality with [method set_lossy_storage_quality].
</constant> </constant>
<constant name="STORAGE_COMPRESS_LOSSLESS" value="2"> <constant name="STORAGE_COMPRESS_LOSSLESS" value="2">
[Image] data is compressed with a lossless algorithm.
</constant> </constant>
</constants> </constants>
</class> </class>
@ -16497,8 +16538,11 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class> </class>
<class name="LargeTexture" inherits="Texture" category="Core"> <class name="LargeTexture" inherits="Texture" category="Core">
<brief_description> <brief_description>
A Texture capable of storing many smaller Textures with offsets.
</brief_description> </brief_description>
<description> <description>
A Texture capable of storing many smaller Textures with offsets.
You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets.
</description> </description>
<methods> <methods>
<method name="add_piece"> <method name="add_piece">
@ -16509,6 +16553,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="texture" type="Texture"> <argument index="1" name="texture" type="Texture">
</argument> </argument>
<description> <description>
Add another [Texture] to this [LargeTexture], starting on offset "ofs".
</description> </description>
</method> </method>
<method name="set_piece_offset"> <method name="set_piece_offset">
@ -16517,6 +16562,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="ofs" type="Vector2"> <argument index="1" name="ofs" type="Vector2">
</argument> </argument>
<description> <description>
Set the offset of the piece with index "idx" to "ofs".
</description> </description>
</method> </method>
<method name="set_piece_texture"> <method name="set_piece_texture">
@ -16525,22 +16571,26 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="1" name="texture" type="Texture"> <argument index="1" name="texture" type="Texture">
</argument> </argument>
<description> <description>
Set the [Texture] of the piece with index "idx" to "ofs".
</description> </description>
</method> </method>
<method name="set_size"> <method name="set_size">
<argument index="0" name="size" type="Vector2"> <argument index="0" name="size" type="Vector2">
</argument> </argument>
<description> <description>
Set the size of this [LargeTexture].
</description> </description>
</method> </method>
<method name="clear"> <method name="clear">
<description> <description>
Clear the [LargeTexture].
</description> </description>
</method> </method>
<method name="get_piece_count" qualifiers="const"> <method name="get_piece_count" qualifiers="const">
<return type="int"> <return type="int">
</return> </return>
<description> <description>
Return the number of pieces currently in this [LargeTexture].
</description> </description>
</method> </method>
<method name="get_piece_offset" qualifiers="const"> <method name="get_piece_offset" qualifiers="const">
@ -16549,6 +16599,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int"> <argument index="0" name="idx" type="int">
</argument> </argument>
<description> <description>
Return the offset of the piece with index "idx".
</description> </description>
</method> </method>
<method name="get_piece_texture" qualifiers="const"> <method name="get_piece_texture" qualifiers="const">
@ -16557,6 +16608,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<argument index="0" name="idx" type="int"> <argument index="0" name="idx" type="int">
</argument> </argument>
<description> <description>
Return the [Texture] of the piece with index "idx".
</description> </description>
</method> </method>
</methods> </methods>