Location:
w32adll.h
Link against: N/A
MAnimSpriteFunctions
Supported from 5.1
Sprite animation utility functions interface. The interface includes 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.
Note:
The classes’ functions are declared as pure virtual in the header file. However, as stated above, you do not need to derive from this class, so these have not been marked as pure virtual in this document.
Defined in MAnimSpriteFunctions
:
Activate()
, GetSpriteMember()
, SetPosition()
, SizeChangedL()
, UpdateMember()
TSpriteMember* GetSpriteMember(TInt aMember) const;
Gets sprite member data. Each member of the sprite is effectively a different bitmap, which is displayed for a different amount of time.
|
|
void UpdateMember(TInt aMember,const TRect& aRect,TBool aFullUpdate);
Redraw part of a sprite. 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.
|
void Activate(TBool aActive);
Turns sprite on or off. In effect this makes the sprite bitmap visible.
|
void SizeChangedL();
Finishes constructing sprite. It also sets the currently displayed sprite member to zero.
This function must be called after members are sized or change size.
void SetPosition(const TPoint &aPos);
Set the sprite’s position.
|