Public Member Functions

FIFE::SDLImage Class Reference

#include <sdlimage.h>

Inheritance diagram for FIFE::SDLImage:
Inheritance graph
[legend]
Collaboration diagram for FIFE::SDLImage:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void invalidate ()
virtual void setSurface (SDL_Surface *surface)
virtual void render (const Rect &rect, uint8_t alpha=255, uint8_t const *rgb=0)
virtual void useSharedImage (const ImagePtr &shared, const Rect &region)
virtual void forceLoadInternal ()

Detailed Description

The SDL implementation of the Image base class.

Definition at line 40 of file sdlimage.h.


Member Function Documentation

void FIFE::SDLImage::forceLoadInternal (  )  [virtual]

Forces to load the image into internal memory of GPU

Implements FIFE::Image.

Definition at line 684 of file sdlimage.cpp.

virtual void FIFE::SDLImage::invalidate (  )  [inline, virtual]

Invalidates the Image causing it to be reset or re-loaded

Implements FIFE::Image.

Definition at line 50 of file sdlimage.h.

void FIFE::SDLImage::render ( const Rect rect,
uint8_t  alpha = 255,
uint8_t const *  rgb = 0 
) [virtual]

Renders itself to the current render target (main screen or attached destination image) at the rectangle rect. Convenience function

Parameters:
rect The position and clipping where to draw this image to.
alpha The alpha value, with which to draw self.
rgb The color value of overlay if any.

Implements FIFE::Image.

Definition at line 332 of file sdlimage.cpp.

References FIFE::RectType< T >::bottom(), FIFE::RectType< T >::h, FIFE::RectType< T >::right(), FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.

void FIFE::SDLImage::setSurface ( SDL_Surface *  surface  )  [virtual]

This frees the current suface and replaces it with the surface passed in the parameter (which can be NULL).

See also:
Image::reset(SDL_Surface* surface)
Parameters:
surface the SDL_Surface to use for this image

Implements FIFE::Image.

Definition at line 89 of file sdlimage.cpp.

References FIFE::Image::reset().

Referenced by useSharedImage().

Here is the caller graph for this function:

void FIFE::SDLImage::useSharedImage ( const ImagePtr shared,
const Rect region 
) [virtual]

After this call all image data will be taken from the given image and its subregion

Implements FIFE::Image.

Definition at line 662 of file sdlimage.cpp.

References FIFE::RectType< T >::h, setSurface(), FIFE::RectType< T >::w, FIFE::RectType< T >::x, and FIFE::RectType< T >::y.


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