C# Class Fusion.Engine.Graphics.TextureAtlas

Represents texture atlas.
Inheritance: System.DisposableBase
Show file Open project: demiurghg/FusionEngine Class Usage Examples

Public Methods

Method Description
GetNormalizedRectangles ( int maxCount = -1 ) : RectangleF[]

Gets float rectangles of all subimages in normalized texture coordibates

GetRectangles ( int maxCount = -1 ) : Rectangle[]

Gets rectangles of all subimages in texels.

GetSubImageNames ( ) : string[]

Gets names of all subimages.

IndexOf ( string name ) : int

Gets index if particular subimage.

TextureAtlas ( RenderSystem rs, Stream stream, bool useSRgb = false ) : System

Creates texture atlas from stream.

this ( int index ) : Rectangle

Gets subimage rectangle by its index

this ( string name ) : Rectangle

Gets subimage rectangle by its index

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes texture atlas.

Method Details

Dispose() protected method

Disposes texture atlas.
protected Dispose ( bool disposing ) : void
disposing bool
return void

GetNormalizedRectangles() public method

Gets float rectangles of all subimages in normalized texture coordibates
public GetNormalizedRectangles ( int maxCount = -1 ) : RectangleF[]
maxCount int Maximum number of recatangles. /// If maxCount greater than number of images the rest of /// he array will be filled with zeroed rectangles.
return RectangleF[]

GetRectangles() public method

Gets rectangles of all subimages in texels.
public GetRectangles ( int maxCount = -1 ) : Rectangle[]
maxCount int Maximum number of recatangles. /// If maxCount greater than number of images /// the rest of the array will be filled with zeroed rectangles.
return Rectangle[]

GetSubImageNames() public method

Gets names of all subimages.
public GetSubImageNames ( ) : string[]
return string[]

IndexOf() public method

Gets index if particular subimage.
public IndexOf ( string name ) : int
name string
return int

TextureAtlas() public method

Creates texture atlas from stream.
public TextureAtlas ( RenderSystem rs, Stream stream, bool useSRgb = false ) : System
rs RenderSystem
stream Stream
useSRgb bool
return System

this() public method

Gets subimage rectangle by its index
public this ( int index ) : Rectangle
index int
return Rectangle

this() public method

Gets subimage rectangle by its index
public this ( string name ) : Rectangle
name string
return Rectangle