#include <image.h>
Public Member Functions | |
VisualImageXMG (Gfx::Driver *gfx) | |
void | load (Common::ReadStream *stream) |
void | readOriginalSize (Common::ReadStream *stream) |
bool | loadPNG (Common::SeekableReadStream *stream) |
void | render (const Common::Point &position, bool useOffset) |
void | render (const Common::Point &position, bool useOffset, bool unscaled) |
void | setHotSpot (const Common::Point &hotspot) |
Common::Point | getHotspot () const |
void | setFadeLevel (float fadeLevel) |
bool | isPointSolid (const Common::Point &point) const |
int | getWidth () const |
int | getHeight () const |
const Graphics::Surface * | getSurface () const |
Public Member Functions inherited from Stark::Visual | |
Visual (VisualType type) | |
template<class T > | |
T * | get () |
Static Public Attributes | |
static const VisualType | TYPE = Visual::kImageXMG |
Additional Inherited Members | |
Public Types inherited from Stark::Visual | |
enum | VisualType { kImageXMG = 2, kRendered = 3, kImageText = 4, kSmackerStream = 5, kActor = 6, kSmackerFMV = 7, kEffectFish = 8, kEffectBubbles = 9, kEffectFirefly = 10, kExplodingImage = 100, kFlashingImage = 101 } |
XMG (still image) renderer
void Stark::VisualImageXMG::load | ( | Common::ReadStream * | stream | ) |
Load the pixel data from a XMG image
void Stark::VisualImageXMG::readOriginalSize | ( | Common::ReadStream * | stream | ) |
Load the size from an XMG image
bool Stark::VisualImageXMG::loadPNG | ( | Common::SeekableReadStream * | stream | ) |
Load the pixel data from a PNG image
void Stark::VisualImageXMG::setHotSpot | ( | const Common::Point & | hotspot | ) |
Set an offset used when rendering
void Stark::VisualImageXMG::setFadeLevel | ( | float | fadeLevel | ) |
The fade level is added to the color value of each pixel
It is a value between -1 and 1
bool Stark::VisualImageXMG::isPointSolid | ( | const Common::Point & | point | ) | const |
Perform a transparency hit test on an image point
int Stark::VisualImageXMG::getWidth | ( | ) | const |
Get the width in pixels
int Stark::VisualImageXMG::getHeight | ( | ) | const |
Get the height in pixels
const Graphics::Surface* Stark::VisualImageXMG::getSurface | ( | ) | const |
Get a read only pointer to the surface backing the image