ImageTexture¶
Inherits: Texture < Resource < Reference < Object
Category: Core
Brief Description¶
Member Functions¶
void |
|
void |
create_from_image ( Image image, int flags=7 ) |
void |
fix_alpha_edges ( ) |
get_data ( ) const |
|
get_format ( ) const |
|
get_lossy_storage_quality ( ) const |
|
get_storage ( ) const |
|
void |
|
void |
normal_to_xy ( ) |
void |
|
void |
|
void |
set_lossy_storage_quality ( float quality ) |
void |
set_size_override ( Vector2 size ) |
void |
set_storage ( int mode ) |
void |
Numeric Constants¶
STORAGE_RAW = 0 — Image data is stored raw and unaltered.
STORAGE_COMPRESS_LOSSY = 1 — Image data is compressed with a lossy algorithm. You can set the storage quality with set_lossy_storage_quality.
STORAGE_COMPRESS_LOSSLESS = 2 — Image data is compressed with a lossless algorithm.
Description¶
Member Function Description¶
Create a new ImageTexture with “width” and “height”.
“format” one of Image.FORMAT_*.
“flags” one or more of Texture.FLAG_*.
Create a new ImageTexture from an Image with “flags” from Texture.FLAG_*.
void fix_alpha_edges ( )
Image get_data ( ) const
Return the Image of this ImageTexture.
int get_format ( ) const
Return the format of the ImageTexture, one of Image.FORMAT_*.
float get_lossy_storage_quality ( ) const
Return the storage quality for ImageTexture.STORAGE_COMPRESS_LOSSY.
int get_storage ( ) const
Return the storage type. One of ImageTexture.STORAGE_*.
void load ( String path )
Load an ImageTexture.
void normal_to_xy ( )
void premultiply_alpha ( )
void set_data ( Image image )
Set the Image of this ImageTexture.
void set_lossy_storage_quality ( float quality )
Set the storage quality in case of ImageTexture.STORAGE_COMPRESS_LOSSY.
void set_size_override ( Vector2 size )
void set_storage ( int mode )
Set the storage type. One of ImageTexture.STORAGE_*.
void shrink_x2_and_keep_size ( )