ImageTexture¶
Inherits: Texture < Resource < Reference < Object
Category: Core
Member Functions¶
| void | create ( int width, int height, int format, int flags=7 ) |
| void | create_from_image ( Image image, int flags=7 ) |
| int | get_format ( ) const |
| void | load ( String path ) |
| void | set_data ( Image image ) |
| void | set_size_override ( Vector2 size ) |
Member Variables¶
Description¶
A Texture based on an Image. Can be created from an Image with create_from_image.
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_*.
- int get_format ( ) const
Return the format of the ImageTexture, one of Image.FORMAT_*.
- void load ( String path )
Load an ImageTexture.
- void set_data ( Image image )
Set the Image of this ImageTexture.
- void set_size_override ( Vector2 size )
Resizes the ImageTexture to the specified dimensions.