Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Animation overview

[Top]


Purpose

The animation component is a framework that provides support to build animated graphics applications. It provides the basic data types that allow animations to be incorporated into the normal drawing of a window from the client, or to be managed on the server as a sprite.

[Top]


Required background

Windows server component knowledge is recommended before using this component.

[Top]


Key concepts

The component has the following key concepts:

Animation

The animation is a fairly abstract interface owned by a client application. The interface is independent of the source of the data it uses, as the data providers are responsible for providing data to the animation.

Animator

The animator represents each data type supported by the animation framework. It can handle data interpretation, timing and control of the animation. An animator is not be visible to the owner of the animation, but is controlled through it using a standard interface. The animators can either reside on the client or on the server. Each animation selects an animator plug-in to be used by providing an appropriate string obtained from the data provider.

Data provider

A data provider is a generic interface to handle different kinds of data, which has different structures and behaviours, for example, GIFs and SVG (Scalable Vector Graphics). Animations access the data providers they own through an observer interface, which reports events to the animation. The interface in turn reports these events to the respective animators.

Observer

An observer acts as an interface and is responsible for reporting events. The animation framework provides two such observers: a data provider observer, and an animation observer. The data provider observer is an interface between the animation and the data provider. Using this observer the animation can receive data and events from the data provider. The animation observer is an interface between the animation and the client application, and is used to report events to the client application. In Symbian OS v9.1, the animation observer is implemented to report only errors to the client application.

[Top]


Architectural relationships

The animation component provides a set of abstract classes with some basic functionality required for any type of animation. Implementors have to derive their own classes using these abstract classes to support specific animation types such as bitmap animation, sprite animation and so on.

The animation framework also provides concrete implementations of the abstract classes. The concrete implementations of the CAnimation class are:

The framework provides the following concrete implementations for the other two abstract classes, CAnimationDataProvider and CAnimator:

[Top]


API summary

Class Name Description

CAnimation

This is an abstract generic class which provides the basic functionality for all types of animations.

CAnimator

This is an abstract class, which represents each type of data supported by the animation framework. This class is implemented as an ECOM plug-in.

CAnimationDataProvider

This is an abstract class, which takes the animation data and converts it into a format recognized by the animator.

CBasicAnimation

This is a concrete implementation class of the CAnimation class. This class is used for basic client-side animations.

CSpriteAnimation

This is a concrete implementation class of the CAnimation class. This class is used for sprite animations.

[Top]


Typical uses

Creating a basic animation

The animation framework can be used to create a basic client-side animation using the CBasicAnimation class. You can also have your own implementation for other type of animations. For more information, refer to How to create a basic animation.

Creating a sprite animation

The animation framework supports server-side sprite animations using the CSpriteAnimation class. The procedure to create a sprite animation is the same as that for creating a basic client-side animation. The only difference between a client-side animation and a sprite animation is that client-side animations are redrawn by the client application. Whereas, for sprite animations redraws are handled automatically, as they run in the window server's high priority thread.

[Top]


See also