LargeTexture

Inherits: Texture < Resource < Reference < Object

Category: Core

Brief Description

A Texture capable of storing many smaller Textures with offsets.

Methods

intadd_piece ( Vector2 ofs, Texture texture )
voidclear ( )
intget_piece_count ( ) const
Vector2get_piece_offset ( int idx ) const
Textureget_piece_texture ( int idx ) const
voidset_piece_offset ( int idx, Vector2 ofs )
voidset_piece_texture ( int idx, Texture texture )
voidset_size ( Vector2 size )

Description

A Texture capable of storing many smaller Textures with offsets.

You can dynamically add pieces(Texture) to this LargeTexture using different offsets.

Method Descriptions

Add another 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.


Returns the offset of the piece with index “idx”.


Returns the Texture of the piece with index “idx”.


Sets the offset of the piece with index “idx” to “ofs”.


  • void set_piece_texture ( int idx, Texture texture )

Sets the Texture of the piece with index “idx” to “texture”.


Sets the size of this LargeTexture.