ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

XMG (still image) renderer. More...

#include <image.h>

Inheritance diagram for Stark::VisualImageXMG:
Collaboration diagram for Stark::VisualImageXMG:

List of all members.

Public Member Functions

 VisualImageXMG (Gfx::Driver *gfx)
 ~VisualImageXMG () override
void load (Common::ReadStream *stream)
 Load the pixel data from a XMG image.
void readOriginalSize (Common::ReadStream *stream)
 Load the size from an XMG image.
bool loadPNG (Common::SeekableReadStream *stream)
 Load the pixel data from a PNG image.
void render (const Common::Point &position, bool useOffset)
void render (const Common::Point &position, bool useOffset, bool unscaled)
void setHotSpot (const Common::Point &hotspot)
 Set an offset used when rendering.
Common::Point getHotspot () const
void setFadeLevel (float fadeLevel)
 The fade level is added to the color value of each pixel.
bool isPointSolid (const Common::Point &point) const
 Perform a transparency hit test on an image point.
int getWidth () const
 Get the width in pixels.
int getHeight () const
 Get the height in pixels.
const Graphics::SurfacegetSurface () const
 Get a read only pointer to the surface backing the image.

Static Public Attributes

static const VisualType TYPE = Visual::kImageXMG

Private Member Functions

Graphics::SurfacemultiplyColorWithAlpha (const Graphics::Surface *source)

Private Attributes

Gfx::Driver_gfx
Gfx::SurfaceRenderer_surfaceRenderer
Gfx::Texture_texture
Graphics::Surface_surface
Common::Point _hotspot
uint _originalWidth
uint _originalHeight

Detailed Description

XMG (still image) renderer.

Definition at line 46 of file visual/image.h.


Constructor & Destructor Documentation

Stark::VisualImageXMG::VisualImageXMG ( Gfx::Driver gfx  )  [explicit]

Definition at line 37 of file visual/image.cpp.

Stark::VisualImageXMG::~VisualImageXMG (  )  [override]

Definition at line 47 of file visual/image.cpp.


Member Function Documentation

int Stark::VisualImageXMG::getHeight (  )  const

Get the height in pixels.

Definition at line 173 of file visual/image.cpp.

Common::Point Stark::VisualImageXMG::getHotspot (  )  const [inline]

Definition at line 73 of file visual/image.h.

const Graphics::Surface * Stark::VisualImageXMG::getSurface (  )  const

Get a read only pointer to the surface backing the image.

Definition at line 177 of file visual/image.cpp.

int Stark::VisualImageXMG::getWidth (  )  const

Get the width in pixels.

Definition at line 169 of file visual/image.cpp.

bool Stark::VisualImageXMG::isPointSolid ( const Common::Point point  )  const

Perform a transparency hit test on an image point.

Definition at line 151 of file visual/image.cpp.

void Stark::VisualImageXMG::load ( Common::ReadStream stream  ) 

Load the pixel data from a XMG image.

Definition at line 60 of file visual/image.cpp.

bool Stark::VisualImageXMG::loadPNG ( Common::SeekableReadStream stream  ) 

Load the pixel data from a PNG image.

Definition at line 76 of file visual/image.cpp.

Graphics::Surface * Stark::VisualImageXMG::multiplyColorWithAlpha ( const Graphics::Surface source  )  [private]

Definition at line 104 of file visual/image.cpp.

void Stark::VisualImageXMG::readOriginalSize ( Common::ReadStream stream  ) 

Load the size from an XMG image.

Definition at line 72 of file visual/image.cpp.

void Stark::VisualImageXMG::render ( const Common::Point position,
bool  useOffset,
bool  unscaled 
)

Definition at line 135 of file visual/image.cpp.

void Stark::VisualImageXMG::render ( const Common::Point position,
bool  useOffset 
)

Definition at line 131 of file visual/image.cpp.

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

Definition at line 147 of file visual/image.cpp.

void Stark::VisualImageXMG::setHotSpot ( const Common::Point hotspot  ) 

Set an offset used when rendering.

Definition at line 56 of file visual/image.cpp.


Member Data Documentation

Definition at line 97 of file visual/image.h.

Definition at line 101 of file visual/image.h.

Definition at line 103 of file visual/image.h.

Definition at line 102 of file visual/image.h.

Definition at line 100 of file visual/image.h.

Definition at line 99 of file visual/image.h.

const VisualType Stark::VisualImageXMG::TYPE = Visual::kImageXMG [static]

Definition at line 48 of file visual/image.h.


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


Generated on Sat Mar 16 2019 05:06:57 for ResidualVM by doxygen 1.7.1
curved edge   curved edge