A Texture capable of storing many smaller Textures with offsets.
    public class LargeTexture : Texture

A Texture capable of storing many smaller Textures with offsets.

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

Inheritance Chain

Constructors

    public LargeTexture()

Properties

    public Collections.Array _Data { get; set; }

Methods

    public int AddPiece(Vector2 ofs, Texture texture)

Add another Texture to this LargeTexture, starting on offset “ofs”.

    public void Clear()

Clears the LargeTexture.

    public int GetPieceCount()

Returns the number of pieces currently in this LargeTexture.

    public Vector2 GetPieceOffset(int idx)

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

    public Texture GetPieceTexture(int idx)

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

    public void SetPieceOffset(int idx, Vector2 ofs)

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

    public void SetPieceTexture(int idx, Texture texture)

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

    public void SetSize(Vector2 size)

Sets the size of this LargeTexture.

Tags: