![]() |
AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
A BitmapSprite is a bitmapped visual representation of an on screen game object. More...
#include <CzBitmapSprite.h>
Public Types | |
| enum | eImageTransform { ImageTransform_None = 0, ImageTransform_FlipX = 1, ImageTransform_FlipY = 2, ImageTransform_FlipXY = 3 } |
Public Member Functions | |
| void | setImage (CzImage *image) |
| CzImage * | getImage () |
| 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 |
| CzVec2 * | getUVList () |
| 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. | |
A BitmapSprite is a bitmapped visual representation of an on screen game object.
| CzBitmapSprite::CzBitmapSprite | ( | ) | [inline] |
| virtual CzBitmapSprite::~CzBitmapSprite | ( | ) | [inline, virtual] |
| void CzBitmapSprite::Draw | ( | ) | [virtual] |
Implements CzSprite.
Reimplemented in CzBitmapSprite9, and CzBitmapPoly.
| CzImage* CzBitmapSprite::getImage | ( | ) | [inline] |
| eImageTransform CzBitmapSprite::getImageTransform | ( | ) | const [inline] |
| 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] |
| CzVec2* CzBitmapSprite::getUVList | ( | ) | [inline] |
| void CzBitmapSprite::Init | ( | int | vertex_count = 4 | ) | [virtual] |
Initialises the sprite.
| vertex_count | Number 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::setFromBrush | ( | CzBrushImage * | brush | ) |
| void CzBitmapSprite::setGeometry | ( | CzGeometry * | geom | ) | [virtual] |
Sets the sprites geometry.
| [in] | geom | If 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::setSrcRect | ( | CzIRect * | src | ) |
| 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 | ||
| ) |
eImageTransform CzBitmapSprite::ImageTransform [protected] |
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.