Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: mdaimageconverter.h
Link against: mediaclientimage.lib

Class CMdaBitmapScaler

class CMdaBitmapScaler : public CBase;

Description

Re-scales a bitmap.

Replaced by Image Conversion library - see CBitmapScaler

The class offers a simple interface to perform arbitrary re-scaling of a bitmap.

Derivation

Members

Defined in CMdaBitmapScaler:
CancelScaling(), NewL(), ScaleL(), ScaleL(), ~CMdaBitmapScaler()

Inherited from CBase:
Delete(), Extension_(), operator new()

See also:


Construction and destruction


NewL()

static IMPORT_C CMdaBitmapScaler *NewL();

Description

Constructs and initialises a new instance of the image scaler.

The function leaves if the image scaler object cannot be created.

Return value

CMdaBitmapScaler *

A pointer to the new image scaler object.


~CMdaBitmapScaler()

virtual IMPORT_C ~CMdaBitmapScaler();

Description

Default destructor.

Frees all associated resources.

[Top]


Member functions


ScaleL()

IMPORT_C void ScaleL(MMdaImageUtilObserver &aObserver, CFbsBitmap &aSrcBitmap, CFbsBitmap &aTgtBitmap, TBool aMaintainAspectRatio=ETrue);

Description

Begins the bitmap re-scaling operation.

The scaling factor is based on the relative sizes of the source and target bitmaps. The operation is asynchronous.

When it is completed, successfully or otherwise, the callback function MMdaImageUtilObserver::MiuoConvertComplete() is called, passing the state of the operation.

Parameters

MMdaImageUtilObserver &aObserver

The image utility observer interface.

CFbsBitmap &aSrcBitmap

The bitmap to be re-scaled.

CFbsBitmap &aTgtBitmap

The target location for the re-scaled bitmap.

TBool aMaintainAspectRatio

ETrue - the aspect ratio is retained; this is the default. The same scaling factor is applied in both the horizontal and vertical directions. This is the smaller of the horizontal scaling factor and the vertical scaling factor. EFalse - the aspect ratio need not be retained.


ScaleL()

IMPORT_C void ScaleL(MMdaImageUtilObserver &aObserver, CFbsBitmap &aBitmap, TSize aDestSize, TBool aMaintainAspectRatio=ETrue);

Description

Begins the bitmap re-scaling operation.

The scaling factor is based on the relative value of the source bitmap size and the explicitly supplied size. The operation is asynchronous. When it is complete, successfully or otherwise, the callback function MMdaImageUtilObserver::MiuoConvertComplete() is called, passing the state of the operation.

Parameters

MMdaImageUtilObserver &aObserver

The image utility observer interface.

CFbsBitmap &aBitmap

The bitmap to be re-scaled. This reference is also the target location for the re-scaled bitmap.

TSize aDestSize

The requested target size for the re-scaled bitmap.

TBool aMaintainAspectRatio

ETrue - the aspect ratio is retained; this is the default. The same scaling factor is applied in both the horizontal and vertical directions. This is the smaller of the horizontal scaling factor and the vertical scaling factor. EFalse - the aspect ratio need not be retained.


CancelScaling()

IMPORT_C void CancelScaling();

Description

Cancels the bitmap re-scaling operation.

The observer callback function MMdaImageUtilObserver::MiuoConvertComplete() is not called.