AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzBitmapSprite Class Reference

A BitmapSprite is a bitmapped visual representation of an on screen game object. More...

#include <CzBitmapSprite.h>

Inheritance diagram for CzBitmapSprite:
CzSprite CzBitmapPoly CzBitmapSprite9

List of all members.

Public Types

enum  eImageTransform { ImageTransform_None = 0, ImageTransform_FlipX = 1, ImageTransform_FlipY = 2, ImageTransform_FlipXY = 3 }

Public Member Functions

void setImage (CzImage *image)
CzImagegetImage ()
void setColour (const CzColour &colour, bool use_parent=false)
void setColour (int index, const CzColour &colour)
void setSrcDest (int x, int y, int width, int height)
void setSrcRect (int x, int y, int width, int height)
void setSrcTile (float x, float y)
void setSrcTiled (bool tiled)
void setSrcRect (CzIRect *src)
CzIRect getSrcRect () const
int getSrcWidth () const
int getSrcHeight () const
CzVec2 getSrcTile () const
bool getSrcTiled () const
void setFromBrush (CzBrushImage *brush)
void setImageTransform (eImageTransform transform)
eImageTransform getImageTransform () const
CzVec2getUVList ()
void setUVList (CzVec2 *uvs, int num_uvs)
void setUVList (CzVec2 *uvs, int offset, int num_uvs)
void setUV (CzVec2 *uv, int offset)
void setGeometry (CzGeometry *geom)
 Sets the sprites geometry.
 CzBitmapSprite ()
virtual ~CzBitmapSprite ()
void Init (int vertex_count=4)
 Initialises the sprite.
void Draw ()

Protected Member Functions

void RebuildUVList ()

Protected Attributes

int SrcX
int SrcY
 Top left position in source texture.
int SrcWidth
int SrcHeight
 Width and height of sprite in source texture.
float SrcTileX
float SrcTileY
 X and Y axis tiling factors.
eImageTransform ImageTransform
 Marmalade image transform.
bool UVsDirty
 Dirty when source texture has changed.

Detailed Description

A BitmapSprite is a bitmapped visual representation of an on screen game object.


Member Enumeration Documentation

Enumerator:
ImageTransform_None 
ImageTransform_FlipX 
ImageTransform_FlipY 
ImageTransform_FlipXY 

Constructor & Destructor Documentation

virtual CzBitmapSprite::~CzBitmapSprite ( ) [inline, virtual]

Member Function Documentation

void CzBitmapSprite::Draw ( ) [virtual]

Implements CzSprite.

Reimplemented in CzBitmapSprite9, and CzBitmapPoly.

int CzBitmapSprite::getSrcHeight ( ) const [inline]
CzIRect CzBitmapSprite::getSrcRect ( ) const [inline]
CzVec2 CzBitmapSprite::getSrcTile ( ) const [inline]
bool CzBitmapSprite::getSrcTiled ( ) const [inline]
int CzBitmapSprite::getSrcWidth ( ) const [inline]
void CzBitmapSprite::Init ( int  vertex_count = 4) [virtual]

Initialises the sprite.

Parameters:
vertex_countNumber of vertices that the sprite is made up from.

Reimplemented from CzSprite.

Reimplemented in CzBitmapSprite9.

void CzBitmapSprite::RebuildUVList ( ) [protected]

Reimplemented in CzBitmapSprite9, and CzBitmapPoly.

void CzBitmapSprite::setColour ( const CzColour colour,
bool  use_parent = false 
) [virtual]

Reimplemented from CzSprite.

void CzBitmapSprite::setColour ( int  index,
const CzColour colour 
)
void CzBitmapSprite::setGeometry ( CzGeometry geom) [virtual]

Sets the sprites geometry.

Parameters:
[in]geomIf non-null, the geometry.

Reimplemented from CzSprite.

void CzBitmapSprite::setImage ( CzImage image)
void CzBitmapSprite::setImageTransform ( eImageTransform  transform) [inline]
void CzBitmapSprite::setSrcDest ( int  x,
int  y,
int  width,
int  height 
)
void CzBitmapSprite::setSrcRect ( int  x,
int  y,
int  width,
int  height 
)
void CzBitmapSprite::setSrcTile ( float  x,
float  y 
)
void CzBitmapSprite::setSrcTiled ( bool  tiled)
void CzBitmapSprite::setUV ( CzVec2 uv,
int  offset 
)
void CzBitmapSprite::setUVList ( CzVec2 uvs,
int  num_uvs 
)
void CzBitmapSprite::setUVList ( CzVec2 uvs,
int  offset,
int  num_uvs 
)

Member Data Documentation

Marmalade image transform.

int CzBitmapSprite::SrcHeight [protected]

Width and height of sprite in source texture.

float CzBitmapSprite::SrcTileX [protected]
float CzBitmapSprite::SrcTileY [protected]

X and Y axis tiling factors.

int CzBitmapSprite::SrcWidth [protected]
int CzBitmapSprite::SrcX [protected]
int CzBitmapSprite::SrcY [protected]

Top left position in source texture.

bool CzBitmapSprite::UVsDirty [protected]

Dirty when source texture has changed.


The documentation for this class was generated from the following files: