- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::GUI::Controls::CAnimation Class Reference

Inheritance diagram for Exponent::GUI::Controls::CAnimation:

List of all members.

## Detailed Description

Displays an animation. You control the frame number with the controls float value.

Date:
  11/04/2005

Author:
  Paul Chana

Version:
  1.0.0 Initial version

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CAnimation.hpp,v 1.6 2007/02/08 21:07:54 paul Exp

Definition at line 37 of file CAnimation.hpp.

## Public Member Functions

- CAnimation (IControlRoot *root, const long uniqueId, const CRect &area)
- virtual void drawControl (CGraphics &graphics)
- virtual void setAnimationImage (CImageManager::CAnimationReference *animationReference, const bool invertAnimation=false)
- virtual void setAnimationImage (IImage *theImage, const long heightOfEachFrame, const long numberOfFrames, const bool invertAnimation=false)
- virtual ~CAnimation ()

## Protected Attributes

- long m_frameHeight
- bool m_invertAnimationStrip
- long m_numberOfFrames
- CRect m_offsetArea

## Constructor & Destructor Documentation

Exponent::GUI::Controls::CAnimation::CAnimation | ( | IControlRoot * | root,
|  | const long | uniqueId,
|  | const CRect & | area |
| ) |  |  |

Construction

Parameters:

  | root | The root control that this control is being added to
  | uniqueId | The unique Identifier of this control or CCONTROL_NO_ID_REQUIRED if no id is required
  | area | The area of this control relative to the root controls top left

virtual Exponent::GUI::Controls::CAnimation::~CAnimation | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

virtual void Exponent::GUI::Controls::CAnimation::drawControl | ( | CGraphics & | graphics | ) | `[virtual]`

Draw the control

Parameters:

  | graphics | The graphics context

Reimplemented from Exponent::GUI::Controls::CControl.

virtual void Exponent::GUI::Controls::CAnimation::setAnimationImage | ( | CImageManager::CAnimationReference * | animationReference,
|  | const bool | invertAnimation = `false` |
| ) |  |  | `[virtual]`

Set the animation image

Parameters:

  | animationReference | The animation image
  | invertAnimation | If true, expects animation to run bottom to top, else runs top to bottom

virtual void Exponent::GUI::Controls::CAnimation::setAnimationImage | ( | IImage * | theImage,
|  | const long | heightOfEachFrame,
|  | const long | numberOfFrames,
|  | const bool | invertAnimation = `false` |
| ) |  |  | `[virtual]`

Set the image

Parameters:

  | theImage | The image to display
  | heightOfEachFrame | The height of each frame of the animation strip
  | numberOfFrames | The total animtion length in frames
  | invertAnimation | If true a value of 1.0 indicates the beggining of the animation (rather than the normal 0.0 being te beggining).

## Member Data Documentation

long Exponent::GUI::Controls::CAnimation::m_frameHeight`[protected]`

Height of each frame

Definition at line 94 of file CAnimation.hpp.

bool Exponent::GUI::Controls::CAnimation::m_invertAnimationStrip`[protected]`

Should the animation be played backwards?

Definition at line 97 of file CAnimation.hpp.

long Exponent::GUI::Controls::CAnimation::m_numberOfFrames`[protected]`

Total number of frames in the animation

Definition at line 95 of file CAnimation.hpp.

CRect Exponent::GUI::Controls::CAnimation::m_offsetArea`[protected]`

Area we are offset by

Definition at line 96 of file CAnimation.hpp.