Classref for: ImageTexture, Image, LargeTexture
This commit is contained in:
parent
8a4eca8aa8
commit
ec96e36bc9
|
@ -15237,6 +15237,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">
|
||||||
|
@ -15247,6 +15248,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">
|
||||||
|
@ -15259,6 +15261,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">
|
||||||
|
@ -15267,6 +15270,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">
|
||||||
|
@ -15275,18 +15279,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">
|
||||||
|
@ -15297,18 +15304,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">
|
||||||
|
@ -15321,6 +15331,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">
|
||||||
|
@ -15329,18 +15340,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">
|
||||||
|
@ -15349,6 +15363,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">
|
||||||
|
@ -15361,6 +15376,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">
|
||||||
|
@ -15373,6 +15389,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">
|
||||||
|
@ -15381,6 +15398,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">
|
||||||
|
@ -15454,12 +15472,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">
|
||||||
|
@ -15472,6 +15498,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">
|
||||||
|
@ -15480,54 +15509,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">
|
||||||
|
@ -15555,10 +15593,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>
|
||||||
|
@ -17979,8 +18020,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">
|
||||||
|
@ -17991,6 +18035,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">
|
||||||
|
@ -17999,6 +18044,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">
|
||||||
|
@ -18007,22 +18053,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">
|
||||||
|
@ -18031,6 +18081,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">
|
||||||
|
@ -18039,6 +18090,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>
|
||||||
|
|
Loading…
Reference in New Issue