diff options
Diffstat (limited to 'doc/classes/Image.xml')
-rw-r--r-- | doc/classes/Image.xml | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index c6d63035d1..2cd17cb5c5 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Image" inherits="Resource" category="Core" version="3.2"> +<class name="Image" inherits="Resource" version="4.0"> <brief_description> Image datatype. </brief_description> @@ -71,6 +71,7 @@ <argument index="0" name="bump_scale" type="float" default="1.0"> </argument> <description> + Converts a bumpmap to a normalmap. A bumpmap provides a height offset per-pixel, while a normalmap provides a normal direction per pixel. </description> </method> <method name="clear_mipmaps"> @@ -90,7 +91,7 @@ <argument index="2" name="lossy_quality" type="float"> </argument> <description> - Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [code]COMPRESS_*[/code] constants. + Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants. </description> </method> <method name="convert"> @@ -99,7 +100,7 @@ <argument index="0" name="format" type="int" enum="Image.Format"> </argument> <description> - Converts the image's format. See [code]FORMAT_*[/code] constants. + Converts the image's format. See [enum Format] constants. </description> </method> <method name="copy_from"> @@ -123,7 +124,7 @@ <argument index="3" name="format" type="int" enum="Image.Format"> </argument> <description> - Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="create_from_data"> @@ -140,7 +141,7 @@ <argument index="4" name="data" type="PoolByteArray"> </argument> <description> - Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="crop"> @@ -165,7 +166,7 @@ <return type="int" enum="Image.AlphaMode"> </return> <description> - Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found. + Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> <method name="expand_x2_hq2x"> @@ -225,7 +226,7 @@ <return type="int" enum="Image.Format"> </return> <description> - Returns the image's format. See [code]FORMAT_*[/code] constants. + Returns the image's format. See [enum Format] constants. </description> </method> <method name="get_height" qualifiers="const"> @@ -284,7 +285,7 @@ <return type="Rect2"> </return> <description> - Returns a [Rect2] enclosing the visible portion of the image. + Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. </description> </method> <method name="get_width" qualifiers="const"> @@ -405,6 +406,7 @@ <return type="Image"> </return> <description> + Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. </description> </method> <method name="save_exr" qualifiers="const"> @@ -491,7 +493,7 @@ </methods> <members> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PoolByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> - Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants. + Holds all of the image's color data in a given format. See [enum Format] constants. </member> </members> <constants> @@ -502,8 +504,10 @@ The maximal height allowed for [Image] resources. </constant> <constant name="FORMAT_L8" value="0" enum="Format"> + Texture format with a single 8-bit depth representing luminance. </constant> <constant name="FORMAT_LA8" value="1" enum="Format"> + OpenGL texture format with two values, luminance and alpha each stored with 8 bits. </constant> <constant name="FORMAT_R8" value="2" enum="Format"> OpenGL texture format [code]RED[/code] with a single component and a bitdepth of 8. @@ -643,26 +647,37 @@ Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. </constant> <constant name="ALPHA_NONE" value="0" enum="AlphaMode"> + Image does not have alpha. </constant> <constant name="ALPHA_BIT" value="1" enum="AlphaMode"> + Image stores alpha in a single bit. </constant> <constant name="ALPHA_BLEND" value="2" enum="AlphaMode"> + Image uses alpha. </constant> <constant name="COMPRESS_S3TC" value="0" enum="CompressMode"> + Use S3TC compression. </constant> <constant name="COMPRESS_PVRTC2" value="1" enum="CompressMode"> + Use PVRTC2 compression. </constant> <constant name="COMPRESS_PVRTC4" value="2" enum="CompressMode"> + Use PVRTC4 compression. </constant> <constant name="COMPRESS_ETC" value="3" enum="CompressMode"> + Use ETC compression. </constant> <constant name="COMPRESS_ETC2" value="4" enum="CompressMode"> + Use ETC2 compression. </constant> <constant name="COMPRESS_SOURCE_GENERIC" value="0" enum="CompressSource"> + Source texture (before compression) is a regular texture. Default for all textures. </constant> <constant name="COMPRESS_SOURCE_SRGB" value="1" enum="CompressSource"> + Source texture (before compression) is in sRGB space. </constant> <constant name="COMPRESS_SOURCE_NORMAL" value="2" enum="CompressSource"> + Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). </constant> </constants> </class> |