#include <transparentsprite.h>
Inherits Graphic.
Inherited by LogicRobot.
Public Member Functions | |
| TransparentSprite () | |
| Creates a null TransparentSprite. | |
| TransparentSprite (int type, int alpha) | |
| Creates a sprite and places it offscreen. | |
| TransparentSprite (int type, Point location, int alpha) | |
| TransparentSprite (int type, int x, int y, int alpha) | |
| ~TransparentSprite () | |
| void | draw (BITMAP *canvas, Point offset) |
| Draws this object's bitmap, with transparency set to alpha. | |
| void | setAlpha (int alpha) |
| int | getAlpha () |
Protected Attributes | |
| BITMAP * | sprite |
| The image this object will display. | |
| int | type |
| A code, specified by an enum, that describes what kind of TransparentSprite this is. | |
| int | alpha |
| The transparency of this object. Must be in [0,255]. | |
This class is very similar to its shorter-named sibling. It simply adds an alpha variable, which ranges from 0 (transparent) to 255 (opaque). The latter is also known as OPAQUE.
There is no noticable difference between a Sprite and a TransparentSprite which has alpha = 255.
| TransparentSprite::TransparentSprite | ( | ) |
Creates a null TransparentSprite.
| TransparentSprite::TransparentSprite | ( | int | type, | |
| int | alpha | |||
| ) |
Creates a sprite and places it offscreen.
| TransparentSprite::TransparentSprite | ( | int | type, | |
| Point | location, | |||
| int | alpha | |||
| ) |
| TransparentSprite::TransparentSprite | ( | int | type, | |
| int | x, | |||
| int | y, | |||
| int | alpha | |||
| ) |
| TransparentSprite::~TransparentSprite | ( | ) |
| void TransparentSprite::draw | ( | BITMAP * | canvas, | |
| Point | offset | |||
| ) | [virtual] |
| int TransparentSprite::getAlpha | ( | ) |
| void TransparentSprite::setAlpha | ( | int | alpha | ) |
int TransparentSprite::alpha [protected] |
The transparency of this object. Must be in [0,255].
BITMAP* TransparentSprite::sprite [protected] |
The image this object will display.
int TransparentSprite::type [protected] |
A code, specified by an enum, that describes what kind of TransparentSprite this is.
1.5.7.1