CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csPixmap Class Reference

This class is an simple set of inline routines good as an abstraction for simple 2D sprites. More...

#include <cspixmap.h>

Inheritance diagram for csPixmap:

csAnimatedPixmap csSimplePixmap List of all members.

Public Methods

virtual ~csPixmap ()
 Destructor. More...

virtual int Width ()=0
 return current width of this pixmap. More...

virtual int Height ()=0
 return current height of this pixmap. More...

virtual void Advance (csTicks ElapsedTime)=0
 advance in time. More...

virtual iTextureHandleGetTextureHandle ()=0
 return current texture handle. More...

virtual void DrawScaled (iGraphics3D *g3d, int sx, int sy, int sw, int sh, uint8 Alpha=0)=0
 Draw the pixmap given the screen position and new size. More...

void DrawScaledAlign (iGraphics3D *g3d, int sx, int sy, int sw, int sh, int alnx, int alny, uint8 Alpha=0)
 Draw the pixmap given the screen position and new size (aligned). More...

void Draw (iGraphics3D *g3d, int sx, int sy, uint8 Alpha=0)
 Draw the pixmap without rescale. More...

void DrawAlign (iGraphics3D *g3d, int sx, int sy, int alnx, int alny, uint8 Alpha=0)
 Draw the pixmap without rescale (aligned). More...

virtual void DrawTiled (iGraphics3D *g3d, int sx, int sy, int sw, int sh, int orgx, int orgy, uint8 Alpha=0)=0
 Draw the pixmap tiled over an area. More...

void DrawTiled (iGraphics3D *g3d, int sx, int sy, int w, int h, uint8 Alpha=0)
 Fill a rectangle with the pixmap, tiled. More...


Detailed Description

This class is an simple set of inline routines good as an abstraction for simple 2D sprites.

Pixmaps can be drawn with a transparent key color as well as without transparent color: all this depends on texture handle. Note that this class is only used as the interface to several implementations of pixmaps, for example csSimplePixmap.

Definition at line 41 of file cspixmap.h.


Constructor & Destructor Documentation

virtual csPixmap::~csPixmap   [inline, virtual]
 

Destructor.

Definition at line 45 of file cspixmap.h.


Member Function Documentation

virtual void csPixmap::Advance csTicks    ElapsedTime [pure virtual]
 

advance in time.

Implemented in csAnimatedPixmap.

void csPixmap::Draw iGraphics3D   g3d,
int    sx,
int    sy,
uint8    Alpha = 0
[inline]
 

Draw the pixmap without rescale.

Definition at line 64 of file cspixmap.h.

References DrawScaled, Height, uint8, and Width.

void csPixmap::DrawAlign iGraphics3D   g3d,
int    sx,
int    sy,
int    alnx,
int    alny,
uint8    Alpha = 0
[inline]
 

Draw the pixmap without rescale (aligned).

Definition at line 67 of file cspixmap.h.

References DrawScaledAlign, Height, uint8, and Width.

virtual void csPixmap::DrawScaled iGraphics3D   g3d,
int    sx,
int    sy,
int    sw,
int    sh,
uint8    Alpha = 0
[pure virtual]
 

Draw the pixmap given the screen position and new size.

Implemented in csAnimatedPixmap.

Referenced by Draw, and DrawScaledAlign.

void csPixmap::DrawScaledAlign iGraphics3D   g3d,
int    sx,
int    sy,
int    sw,
int    sh,
int    alnx,
int    alny,
uint8    Alpha = 0
[inline]
 

Draw the pixmap given the screen position and new size (aligned).

Definition at line 60 of file cspixmap.h.

References DrawScaled, and uint8.

Referenced by DrawAlign.

void csPixmap::DrawTiled iGraphics3D   g3d,
int    sx,
int    sy,
int    w,
int    h,
uint8    Alpha = 0
[inline]
 

Fill a rectangle with the pixmap, tiled.

Definition at line 80 of file cspixmap.h.

References DrawTiled, and uint8.

virtual void csPixmap::DrawTiled iGraphics3D   g3d,
int    sx,
int    sy,
int    sw,
int    sh,
int    orgx,
int    orgy,
uint8    Alpha = 0
[pure virtual]
 

Draw the pixmap tiled over an area.

multiple draw commands with the same texture and same origin values will align properly. The orgx and orgy point to a pixel (perhaps offscreen) where the (0,0) pixel of this pixmap would be drawn.

Implemented in csAnimatedPixmap.

Referenced by DrawTiled.

virtual iTextureHandle* csPixmap::GetTextureHandle   [pure virtual]
 

return current texture handle.

Implemented in csAnimatedPixmap.

virtual int csPixmap::Height   [pure virtual]
 

return current height of this pixmap.

Implemented in csAnimatedPixmap.

Referenced by Draw, DrawAlign, and csComponent::Pixmap.

virtual int csPixmap::Width   [pure virtual]
 

return current width of this pixmap.

Implemented in csAnimatedPixmap.

Referenced by Draw, DrawAlign, and csComponent::Pixmap.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14