Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <W32ADLL.H>

Class MAnimSpriteFunctions

class MAnimSpriteFunctions;

Description

Sprite animation utility functions interface.

The interface includes functions for querying and manipulating a sprite.

You do NOT have to create an object of this type. The class is implemented by the window server, and provides utility functions to all CSpriteAnim derived classes via the CSpriteAnim::iSpriteFunctions pointer.

It is not intended for user derivation.

Members

Defined in MAnimSpriteFunctions:


Member functions


GetSpriteMember(TInt)const

virtual TSpriteMember* GetSpriteMember(TInt aMember) const=0;

Description

Gets sprite member data.

Each member of the sprite is effectively a bitmap, which is displayed for a different amount of time.

Parameters

TInt aMember

The index of the sprite member for which information is required.

Return value

TSpriteMember *

A pointer to the sprite member.


UpdateMember(TInt,const TRect &,TBool)

virtual void UpdateMember(TInt aMember, const TRect &aRect, TBool aFullUpdate)=0;

Description

Redraws part of a sprite.

WSERV1:

The updates a sprite on the screen, possibly after the bitmap for a particular sprite member has been changed.

Two types of redraw are possible. A full update takes the bitmap off the screen and then re-draws it. This is 'safe' in that the screen always reflects the contents of the sprite bitmap. However it can result in flicker. Use the aRect parameter to specify the (small) part of the sprite which has been changed, then any flicker will only occur in this rectangle.

A full update is required if you have removed pixels from the mask, i.e. made pixels in the sprite transparent when they were not before. If drawing is additive, e.g. you are using a mask or the draw mode is EDrawModePEN, a partial update is possible. Otherwise the aFullUpdate argument is ignored and a full update is always done.

Note: if the sprite member aMember is not visible then there is no need for a change to the display, so the aRect and aFullUpdate parameters are ignored.

param aMember The index of the sprite member that is to be updated. param aRect The part of the sprite member which has changed. param aFullUpdate ETrue for a full update, EFalse otherwise.

WSERV2:

Updates a sprite on the screen, possibly after the bitmap for a particular sprite member has been changed.

Use the aRect parameter to specify the (small) part of the sprite which has been changed, then any flicker will only occur in this rectangle.

A full update used to be required if you had removed pixels from the mask, i.e. made pixels in the sprite transparent when they were not before. If drawing is additive, e.g. you are using a mask or the draw mode is EDrawModePEN, a partial update used to be possible. But newer versions of the window-server always do full back to front rendering.

Note: if the sprite member aMember is not visible then there is no need for a change to the display, so the aRect and aFullUpdate parameters are ignored.

Parameters

TInt aMember

The index of the sprite member that is to be updated.

const TRect &aRect

The part of the sprite member which has changed.

TBool aFullUpdate

Not used. Wserv now always do full back to front rendering.


Activate(TBool)

virtual void Activate(TBool aActive)=0;

Description

Turns a sprite on or off.

In effect this makes the sprite bitmap visible.

Parameters

TBool aActive

ETrue to turn sprite on. EFalse to turn it off.


SizeChangedL()

virtual void SizeChangedL()=0;

Description

Finishes constructing the sprite.

It also sets the currently displayed sprite member to zero.

This function must be called after members change size.


SetPosition(const TPoint &)

virtual void SetPosition(const TPoint &aPos)=0;

Description

Set the sprite's position.

Parameters

const TPoint &aPos

The new position of the sprite.


Reserved()const

private: virtual void Reserved() const;

Description


SpriteCanBeSeen()const

virtual TBool SpriteCanBeSeen() const=0;

Description

Returns the visibility of the sprite.

A sprite can be seen if it is neither obscured by another window nor hidden.

Return value

TBool

ETrue if the sprite can be seen, EFalse otherwise.


Reserved2()const

private: virtual void Reserved2() const;

Description


Reserved3()const

private: virtual void Reserved3() const;

Description


Reserved4()const

private: virtual void Reserved4() const;

Description