Detailed Description

A stack of atlases. All graphics from all your UI's are grouped together into one of two stacks like this.

Public Member Functions

 AtlasStack (int initialSize)
 
 AtlasStack (TextureFormat format, int initialSize)
 
AtlasLocation RequireImage (AtlasEntity image)
 Require the given image on any atlas. Note that this may reject the requirement if the image is too big and isn't worthwhile on an atlas. More...
 
bool OptimiseIfNeeded ()
 Optimises the frames on this stack if it's needed. More...
 
void LockFilterMode (FilterMode mode)
 
void Clear ()
 Empties this atlas stack. More...
 
void Flush ()
 Flushes the atlases that require it. More...
 
void Remove (AtlasEntity texture)
 Removes a texture from the atlas. More...
 
AtlasLocation Get (int entityID)
 Gets the location of the given image on any atlases in this stack. More...
 
void Add (TextureAtlas atlas)
 Adds the given atlas to the top of this stack. More...
 
TextureAtlas Create ()
 

Public Attributes

bool FilterLocked
 True if this atlas stack cannot change filter mode. More...
 
bool PixelChange
 True if any pixels in any atlases changed. More...
 
TextureAtlas Last
 The last atlas on the stack. This is the top. More...
 
TextureAtlas First
 The first atlas on the stack. This is the bottom. More...
 
int InitialSize
 The initial size of atlases in this stack. More...
 
TextureFormat Format =TextureFormat.ARGB32
 The format of the atlases in this stack. More...
 
Dictionary< int, AtlasLocationActiveImages
 A map of current textures to their location on the atlas. More...
 

Package Attributes

bool OptimizeRequested
 Set true when an image on this stack wants to optimize. More...
 

Properties

int Count [get]
 How many atlases are on this stack. More...
 
FilterMode FilterMode [get, set]
 
TextureAtlas Top [get]
 Gets the texture atlas at the top of the stack. Creates it if the stack is empty. More...
 

Private Attributes

FilterMode FilteringMode =FilterMode.Point
 The filter mode of all atlases in this stack. See FilterMode. More...
 

Constructor & Destructor Documentation

Blaze.AtlasStack.AtlasStack ( int  initialSize)
inline
Blaze.AtlasStack.AtlasStack ( TextureFormat  format,
int  initialSize 
)
inline

Member Function Documentation

void Blaze.AtlasStack.Add ( TextureAtlas  atlas)
inline

Adds the given atlas to the top of this stack.

void Blaze.AtlasStack.Clear ( )
inline

Empties this atlas stack.

TextureAtlas Blaze.AtlasStack.Create ( )
inline
void Blaze.AtlasStack.Flush ( )
inline

Flushes the atlases that require it.

AtlasLocation Blaze.AtlasStack.Get ( int  entityID)
inline

Gets the location of the given image on any atlases in this stack.

Parameters
entityIDThe entity ID to find.
Returns
The location on an atlas of the image. Null if it wasn't found.
void Blaze.AtlasStack.LockFilterMode ( FilterMode  mode)
inline
bool Blaze.AtlasStack.OptimiseIfNeeded ( )
inline

Optimises the frames on this stack if it's needed.

void Blaze.AtlasStack.Remove ( AtlasEntity  texture)
inline

Removes a texture from the atlas.

Parameters
textureThe texture to remove.
AtlasLocation Blaze.AtlasStack.RequireImage ( AtlasEntity  image)
inline

Require the given image on any atlas. Note that this may reject the requirement if the image is too big and isn't worthwhile on an atlas.

Member Data Documentation

Dictionary<int,AtlasLocation> Blaze.AtlasStack.ActiveImages

A map of current textures to their location on the atlas.

FilterMode Blaze.AtlasStack.FilteringMode =FilterMode.Point
private

The filter mode of all atlases in this stack. See FilterMode.

bool Blaze.AtlasStack.FilterLocked

True if this atlas stack cannot change filter mode.

TextureAtlas Blaze.AtlasStack.First

The first atlas on the stack. This is the bottom.

TextureFormat Blaze.AtlasStack.Format =TextureFormat.ARGB32

The format of the atlases in this stack.

int Blaze.AtlasStack.InitialSize

The initial size of atlases in this stack.

TextureAtlas Blaze.AtlasStack.Last

The last atlas on the stack. This is the top.

bool Blaze.AtlasStack.OptimizeRequested
package

Set true when an image on this stack wants to optimize.

bool Blaze.AtlasStack.PixelChange

True if any pixels in any atlases changed.

Property Documentation

int Blaze.AtlasStack.Count
get

How many atlases are on this stack.

FilterMode Blaze.AtlasStack.FilterMode
getset
TextureAtlas Blaze.AtlasStack.Top
get

Gets the texture atlas at the top of the stack. Creates it if the stack is empty.