LargeTexture
Inherits: Texture < Resource < Reference < Object
Category: Core
Brief Description
A Texture capable of storing many smaller Textures with offsets.
Member Functions
int | add_piece ( Vector2 ofs, Texture texture ) |
void | clear ( ) |
int | get_piece_count ( ) const |
Vector2 | get_piece_offset ( int idx ) const |
Texture | get_piece_texture ( int idx ) const |
void | set_piece_offset ( int idx, Vector2 ofs ) |
void | set_piece_texture ( int idx, Texture texture ) |
void | set_size ( Vector2 size ) |
Description
A Texture capable of storing many smaller Textures with offsets.
You can dynamically add pieces(Textures) to this fLargeTexture] using different offsets.
Member Function Description
int add_piece ( Vector2 ofs, Texture texture )
Add another Texture to this LargeTexture, starting on offset “ofs”.
void clear ( )
Clear the LargeTexture.
int get_piece_count ( ) const
Return the number of pieces currently in this LargeTexture.
Vector2 get_piece_offset ( int idx ) const
Return the offset of the piece with index “idx”.
Texture get_piece_texture ( int idx ) const
Return the Texture of the piece with index “idx”.
void set_piece_offset ( int idx, Vector2 ofs )
Set the offset of the piece with index “idx” to “ofs”.
void set_piece_texture ( int idx, Texture texture )
Set the Texture of the piece with index “idx” to “ofs”.
void set_size ( Vector2 size )
Set the size of this LargeTexture.
© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_largetexture.html