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

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>
<description>
Copy a "src_rect" [Rect2] from "src" [Image] to this [Image] on coordinates "dest".
</description>
</method>
<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>
<description>
Transfer data from "src" to this [Image] using a "brush" as a mask/brush on coordinates "pos".
</description>
</method>
<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>
<description>
Return a new [Image] from this [Image] that is created by brushhing see [method brush_transfer].
</description>
</method>
<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>
<description>
Return a new compressed [Image] from this [Image] using one of [Image].COMPRESS_*.
</description>
</method>
<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>
<description>
Return a new [Image] from this [Image] with a different format.
</description>
</method>
<method name="decompressed">
<return type="Image">
</return>
<description>
Return a new decompressed [Image].
</description>
</method>
<method name="empty">
<return type="bool">
</return>
<description>
Return whether this [Image] is empty(no data).
</description>
</method>
<method name="fix_alpha_edges">
@ -13976,18 +13983,21 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
<return type="RawArray">
</return>
<description>
Return the raw data of the [Image].
</description>
</method>
<method name="get_format">
<return type="int">
</return>
<description>
Return the format of the [Image], one of [Image].FORMAT_*.
</description>
</method>
<method name="get_height">
<return type="int">
</return>
<description>
Return the height of the [Image].
</description>
</method>
<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>
<description>
Return the color of the pixel in the [Image] on coordinates "x,y" on mipmap level "mipmap_level".
</description>
</method>
<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>
<description>
Return a new [Image] that is a copy of "area" in this [Image].
</description>
</method>
<method name="get_used_rect">
<return type="Rect2">
</return>
<description>
Return the area of this [Image] that is used/visibly colored/opaque.
</description>
</method>
<method name="get_width">
<return type="int">
</return>
<description>
Return the width of the [Image].
</description>
</method>
<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>
<description>
Load an [Image].
</description>
</method>
<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>
<description>
Put a pixel of "color" on coordinates "x,y" on mipmap level "mipmap_level".
</description>
</method>
<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>
<description>
Return a new [Image] from this [Image] that is resized to size "x,y" using [Image].INTERPOLATE_*.
</description>
</method>
<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>
<description>
Save this [Image] as a png.
</description>
</method>
<method name="Image">
@ -14133,12 +14151,20 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</constant>
<constant name="FORMAT_CUSTOM" value="22">
</constant>
<constant name="INTERPOLATE_NEAREST" value="0">
</constant>
<constant name="INTERPOLATE_BILINEAR" value="1">
</constant>
<constant name="INTERPOLATE_CUBIC" value="2">
</constant>
</constants>
</class>
<class name="ImageTexture" inherits="Texture" category="Core">
<brief_description>
A [Texture] based on an [Image].
</brief_description>
<description>
A [Texture] based on an [Image]. Can be created from an [Image].
</description>
<methods>
<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>
<description>
Create a new [ImageTexture] with "width" and "height".
"format" one of [Image].FORMAT_*.
"flags" one or more of [Texture].FLAG_*.
</description>
</method>
<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>
<description>
Create a new [ImageTexture] from an [Image] with "flags" from [Texture].FLAG_*.
</description>
</method>
<method name="get_format" qualifiers="const">
<return type="int">
</return>
<description>
Return the format of the [ImageTexture], one of [Image].FORMAT_*.
</description>
</method>
<method name="load">
<argument index="0" name="path" type="String">
</argument>
<description>
Load an [ImageTexure].
</description>
</method>
<method name="set_data">
<argument index="0" name="image" type="Image">
</argument>
<description>
Set the [Image] of this [ImageTexture].
</description>
</method>
<method name="get_data" qualifiers="const">
<return type="Image">
</return>
<description>
Return the [Image] of this [ImageTexture].
</description>
</method>
<method name="set_storage">
<argument index="0" name="mode" type="int">
</argument>
<description>
Set the storage type. One of [ImageTexture].STORAGE_*.
</description>
</method>
<method name="get_storage" qualifiers="const">
<return type="int">
</return>
<description>
Return the storage type. One of [ImageTexture].STORAGE_*.
</description>
</method>
<method name="set_lossy_storage_quality">
<argument index="0" name="quality" type="float">
</argument>
<description>
Set the storage quality in case of [ImageTexture].STORAGE_COMPRESS_LOSSY.
</description>
</method>
<method name="get_lossy_storage_quality" qualifiers="const">
<return type="float">
</return>
<description>
Return the storage quality for [ImageTexture].STORAGE_COMPRESS_LOSSY.
</description>
</method>
<method name="fix_alpha_edges">
@ -14234,10 +14272,13 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</methods>
<constants>
<constant name="STORAGE_RAW" value="0">
[Image] data is stored raw and unaltered.
</constant>
<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 name="STORAGE_COMPRESS_LOSSLESS" value="2">
[Image] data is compressed with a lossless algorithm.
</constant>
</constants>
</class>
@ -16497,8 +16538,11 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
</class>
<class name="LargeTexture" inherits="Texture" category="Core">
<brief_description>
A Texture capable of storing many smaller Textures with offsets.
</brief_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>
<methods>
<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>
<description>
Add another [Texture] to this [LargeTexture], starting on offset "ofs".
</description>
</method>
<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>
<description>
Set the offset of the piece with index "idx" to "ofs".
</description>
</method>
<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>
<description>
Set the [Texture] of the piece with index "idx" to "ofs".
</description>
</method>
<method name="set_size">
<argument index="0" name="size" type="Vector2">
</argument>
<description>
Set the size of this [LargeTexture].
</description>
</method>
<method name="clear">
<description>
Clear the [LargeTexture].
</description>
</method>
<method name="get_piece_count" qualifiers="const">
<return type="int">
</return>
<description>
Return the number of pieces currently in this [LargeTexture].
</description>
</method>
<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>
<description>
Return the offset of the piece with index "idx".
</description>
</method>
<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>
<description>
Return the [Texture] of the piece with index "idx".
</description>
</method>
</methods>