MAnimSpriteFunctions Class Reference

class MAnimSpriteFunctions

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.

Public Member Functions
voidActivate(TBool)
TSpriteMember *GetSpriteMember(TInt)
voidSetPosition(const TPoint &)
voidSizeChangedL()
TBool SpriteCanBeSeen()
voidUpdateMember(TInt, const TRect &, TBool)
Private Member Functions
voidReserved()
voidReserved2()
voidReserved3()
voidReserved4()

Member Functions Documentation

Activate(TBool)

voidActivate(TBoolaActive)[pure virtual]

Turns a sprite on or off.

In effect this makes the sprite bitmap visible.

Parameters

TBool aActiveETrue to turn sprite on. EFalse to turn it off.

GetSpriteMember(TInt)

TSpriteMember *GetSpriteMember(TIntaMember)const [pure virtual]

Gets sprite member data.

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

Parameters

TInt aMemberThe index of the sprite member for which information is required.

Reserved()

voidReserved()const [private, virtual]

Reserved2()

voidReserved2()const [private, virtual]

Reserved3()

voidReserved3()const [private, virtual]

Reserved4()

voidReserved4()const [private, virtual]

SetPosition(const TPoint &)

voidSetPosition(const TPoint &aPos)[pure virtual]

Set the sprite's position.

Parameters

const TPoint & aPosThe new position of the sprite.

SizeChangedL()

voidSizeChangedL()[pure virtual]

Finishes constructing the sprite.

It also sets the currently displayed sprite member to zero.

This function must be called after members change size.

SpriteCanBeSeen()

TBool SpriteCanBeSeen()const [pure virtual]

Returns the visibility of the sprite.

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

UpdateMember(TInt, const TRect &, TBool)

voidUpdateMember(TIntaMember,
const TRect &aRect,
TBoolaFullUpdate
)[pure virtual]

Redraws part of a sprite. 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 current 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 aMemberThe index of the sprite member that is to be updated.
const TRect & aRectThe part of the sprite member which has changed.
TBool aFullUpdateNot used. Wserv now always do full back to front rendering.