|
|
|
Location:
bmpancli.h
Link against: bmpanim.lib
class CBitmapFrameData : public CBase;
Supported from 6.0
Encapsulates the information required for one frame of an animation.
Each animation frame includes a bitmap that is displayed in a specified position for a specified length of time. You can optionally include a mask that either hides part of the bitmap, or that makes part of the bitmap transparent so that the background can be seen.
You will probably need to define several frames for a complete animation. When you have defined the frames you require, use CBitmapAnimClientData to construct the animation itself.
|
Defined in CBitmapFrameData:
Bitmap(), BitmapsOwnedExternally(), CBitmapFrameData(), IntervalInMilliSeconds(), Mask(), NewL(), NewL(), NewL(), Position(), SetBitmap(), SetBitmapsOwnedExternally(), SetInterval(), SetMask(), SetPosition(), iBitmap, iBitmapsOwnedExternally, iIntervalInMilliSeconds, iMaskBitmap, iPosition, ~CBitmapFrameData()
Inherited from CBase:
operator new()
static CBitmapFrameData* NewL();
Creates a new empty frame object.
|
static CBitmapFrameData* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask=NULL);
Creates a new frame object with a specified bitmap and (optionally) a mask.
The object takes ownership of the specified bitmap and mask.
|
|
static CBitmapFrameData* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aIntervalInMilliSeconds, TPoint aPosition);
Creates a new frame object that:
owns a specified bitmap
owns a mask, if specified
has a specified frame duration
has a specified position relative to the animation window
|
|
~CBitmapFrameData();
Destructor.
It deletes the bitmap and mask objects owned by the frame unless the "owned externally" (SetBitmapsOwnedExternally()) flag is set.
void SetBitmap(CFbsBitmap* aBitmap);
Sets the frame bitmap.
Unless the "owned externally" (SetBitmapsOwnedExternally()) flag is set, it deletes any existing frame bitmap and takes ownership of the new bitmap.
|
void SetMask(CFbsBitmap* aMask);
Sets the frame mask.
Unless the "owned externally" (SetBitmapsOwnedExternally()) flag is set, it deletes any existing mask bitmap and takes ownership of the new bitmap.
|
void SetPosition(TPoint aPosition);
Sets the frame's position relative to the animation window.
|
void SetInterval(TInt aIntervalInMilliSeconds);
Sets for how many milliseconds the frame is displayed.
You can alternatively set the interval for a complete animation using CBitmapAnimClientData::SetFrameInterval(). However, an interval set for an individual frame overrides any interval set at the animation level.
|
void SetBitmapsOwnedExternally(TBool aOwnedExternally);
Sets whether the bitmap and mask are owned by the frame.
Use this function to take, or discard, ownership of a frame bitmap and mask.
|
CFbsBitmap* Bitmap() const;
Gets the frame's bitmap.
This does not affect ownership of the bitmap.
|
CFbsBitmap* Mask() const;
Gets the frame's mask.
This does not affect ownership of the bitmap.
|
TInt IntervalInMilliSeconds() const;
Gets the length of time for which the frame is displayed.
The time is expressed in milliseconds.
|
TPoint Position() const;
Gets the frame's position, relative to the animation window.
|
TBool BitmapsOwnedExternally() const;
Tests whether the frame owns the bitmap, and mask, that is associated with the frame.
|
private: TBool iBitmapsOwnedExternally;
This member is internal and not intended for use.
private: TPoint iPosition;
This member is internal and not intended for use.