CrystalSpace

Public API Reference

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

csAnimationTemplate Class Reference

A 2d animation template. This class is used to create animated pixmaps. More...

#include <cstool/csanim2d.h>

List of all members.

Public Member Functions

 csAnimationTemplate ()
 build a new animation
 ~csAnimationTemplate ()
 destructor
size_t GetFrameCount () const
 get number of frames
csTicks GetLength () const
 get total length of animation (all delays added together)
void AddFrame (csTicks Delay, csPixmap *s)
 add a frame. (giving the length of this frame)
void AddFrame (csTicks Delay, iTextureHandle *Tex)
 add a frame (giving the length of this frame)
void AddFrame (csTicks Delay, iTextureHandle *Tex, int x, int y, int w, int h)
 add a frame (giving the length of this frame)
csPixmapGetFrame (size_t n) const
 get a frame by number
csPixmapGetFrameByTime (csTicks Time)
 get a frame by time
csAnimatedPixmapCreateInstance ()
 create an instance of this animation


Detailed Description

A 2d animation template. This class is used to create animated pixmaps.

Definition at line 34 of file csanim2d.h.


Constructor & Destructor Documentation

csAnimationTemplate::csAnimationTemplate  ) 
 

build a new animation

csAnimationTemplate::~csAnimationTemplate  ) 
 

destructor


Member Function Documentation

void csAnimationTemplate::AddFrame csTicks  Delay,
iTextureHandle Tex,
int  x,
int  y,
int  w,
int  h
[inline]
 

add a frame (giving the length of this frame)

Definition at line 64 of file csanim2d.h.

References AddFrame().

void csAnimationTemplate::AddFrame csTicks  Delay,
iTextureHandle Tex
[inline]
 

add a frame (giving the length of this frame)

Definition at line 61 of file csanim2d.h.

References AddFrame().

void csAnimationTemplate::AddFrame csTicks  Delay,
csPixmap s
[inline]
 

add a frame. (giving the length of this frame)

Definition at line 58 of file csanim2d.h.

References GetLength(), and csArray< T, ElementHandler, MemoryAllocator >::Push().

Referenced by AddFrame().

csAnimatedPixmap* csAnimationTemplate::CreateInstance  ) 
 

create an instance of this animation

csPixmap* csAnimationTemplate::GetFrame size_t  n  )  const [inline]
 

get a frame by number

Definition at line 69 of file csanim2d.h.

References csArray< T, ElementHandler, MemoryAllocator >::Get().

csPixmap* csAnimationTemplate::GetFrameByTime csTicks  Time  ) 
 

get a frame by time

size_t csAnimationTemplate::GetFrameCount  )  const [inline]
 

get number of frames

Definition at line 52 of file csanim2d.h.

References csArray< T, ElementHandler, MemoryAllocator >::Length().

Referenced by GetLength().

csTicks csAnimationTemplate::GetLength  )  const [inline]
 

get total length of animation (all delays added together)

Definition at line 55 of file csanim2d.h.

References csTicks, and GetFrameCount().

Referenced by AddFrame().


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