![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
class CBitmapFrameData : public CBase;
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 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.
CBase
-
Base class for all classes to be instantiated on the heap.
CBitmapFrameData
- Encapsulates the information required for one frame of an animation.
Defined in CBitmapFrameData
:
Bitmap()const
Gets the frame's bitmap.BitmapsOwnedExternally()const
Tests whether the frame owns the bitmap and mask.IntervalInMilliSeconds()const
Gets the frame's duration in milliseconds.Mask()const
Gets the frame's mask.NewL()
Creates a new empty frame object.NewL(CFbsBitmap *,CFbsBitmap *)
Creates a new frame object with a specified bitmap and (optionally) a mask.NewL(CFbsBitmap *,CFbsBitmap *,TInt,TPoint)
Creates a new frame object.Position()const
Gets the frame's position, relative to the animation window.SetBitmap(CFbsBitmap *)
Sets the frame bitmap.SetBitmapsOwnedExternally(TBool)
Sets whether the bitmap and mask are owned by the frame.SetInterval(TInt)
Sets the frame's duration in milliseconds.SetMask(CFbsBitmap *)
Sets the frame mask.SetPosition(TPoint)
Sets the frame's position relative to the animation window.~CBitmapFrameData()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C ~CBitmapFrameData();
Destructor.
It deletes the bitmap and mask objects owned by the frame unless the "owned externally" (CBitmapFrameData::SetBitmapsOwnedExternally(TBool)
) flag is set.
IMPORT_C static CBitmapFrameData* NewL();
Creates a new empty frame object.
|
IMPORT_C static CBitmapFrameData* NewL(CFbsBitmap *aBitmap, CFbsBitmap *aMask=0);
Creates a new frame object with a specified bitmap and (optionally) a mask.
The object takes ownership of the specified bitmap and mask.
|
|
IMPORT_C static CBitmapFrameData* NewL(CFbsBitmap *aBitmap, CFbsBitmap *aMask, TInt aIntervalInMilliSeconds, TPoint aPosition);
Creates a new frame object.
It takes ownership of the specified bitmap and mask (if specified), and is assigned the frame duration and position.
|
|
IMPORT_C void SetBitmap(CFbsBitmap *aBitmap);
Sets the frame bitmap.
Unless the "owned externally" (CBitmapFrameData::SetBitmapsOwnedExternally(TBool)
) flag is set, it deletes any existing frame bitmap and takes ownership of the new bitmap.
|
IMPORT_C void SetMask(CFbsBitmap *aMask);
Sets the frame mask.
Unless the "owned externally" (CBitmapFrameData::SetBitmapsOwnedExternally(TBool)
) flag is set, it deletes any existing mask bitmap and takes ownership of the new bitmap.
|
IMPORT_C void SetPosition(TPoint aPosition);
Sets the frame's position relative to the animation window.
|
IMPORT_C void SetInterval(TInt aIntervalInMilliSeconds);
Sets the frame's duration in milliseconds.
You can alternatively set the interval for a complete animation using CBitmapAnimClientData::SetFrameInterval(TInt)
. However, an interval set for an individual frame overrides any interval set at the animation level.
|
IMPORT_C void SetBitmapsOwnedExternally(TBool aOwnedExternally);
Sets whether the bitmap and mask are owned by the frame.
|
IMPORT_C CFbsBitmap* Bitmap() const;
Gets the frame's bitmap.
This does not affect ownership of the bitmap.
|
IMPORT_C CFbsBitmap* Mask() const;
Gets the frame's mask.
This does not affect ownership of the bitmap.
|
IMPORT_C TInt IntervalInMilliSeconds() const;
Gets the frame's duration in milliseconds.
|
IMPORT_C TPoint Position() const;
Gets the frame's position, relative to the animation window.
|
IMPORT_C TBool BitmapsOwnedExternally() const;
Tests whether the frame owns the bitmap and mask.
|