LargeTexture¶
Inherits: Texture < Resource < Reference < Object
Deprecated. A Texture capable of storing many smaller textures with offsets.
Description¶
Deprecated (will be removed in Redot 4.0). A Texture capable of storing many smaller textures with offsets.
You can dynamically add pieces (Textures) to this LargeTexture using different offsets.
Properties¶
flags |
|
Methods¶
void |
clear ( ) |
get_piece_count ( ) const |
|
get_piece_offset ( int idx ) const |
|
get_piece_texture ( int idx ) const |
|
void |
set_piece_offset ( int idx, Vector2 ofs ) |
void |
set_piece_texture ( int idx, Texture texture ) |
void |
Method Descriptions¶
int add_piece ( Vector2 ofs, Texture texture )
Adds texture
to this LargeTexture, starting on offset ofs
.
void clear ( )
Clears the LargeTexture.
int get_piece_count ( ) const
Returns the number of pieces currently in this LargeTexture.
Vector2 get_piece_offset ( int idx ) const
Returns the offset of the piece with the index idx
.
Texture get_piece_texture ( int idx ) const
Returns the Texture of the piece with the index idx
.
void set_piece_offset ( int idx, Vector2 ofs )
Sets the offset of the piece with the index idx
to ofs
.
void set_piece_texture ( int idx, Texture texture )
Sets the Texture of the piece with index idx
to texture
.
void set_size ( Vector2 size )
Sets the size of this LargeTexture.