LargeTexture
Inherits: Texture < Resource < Reference < Object
类别: 核心
描述
A Texture 能够存储许多具有偏移的较小纹理。
您可以动态添加片段 (Texture s)对此 LargeTexture
使用不同的偏移量。
方法说明
int add_piece ( Vector2 ofs, Texture texture )
添加 texture
对此 LargeTexture
,从偏移开始 ofs
.
清除 LargeTexture
.
int get_piece_count ( ) const
返回此中当前的件数 LargeTexture
.
Vector2 get_piece_offset ( int idx ) const
返回带有索引的工件的偏移量 idx
.
Texture get_piece_texture ( int idx ) const
返回 Texture 有索引的作品 idx
.
void set_piece_offset ( int idx, Vector2 ofs )
使用索引设置工件的偏移量 idx
到 ofs
.
void set_piece_texture ( int idx, Texture texture )
设置 Texture 有索引的作品 idx
到 texture
.
void set_size ( Vector2 size )
设置此的大小 LargeTexture
.