Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: MdaImageConverter.h
Link against: MediaClientImage.lib

Class CMdaBitmapScaler

CMdaBitmapScaler

Support

Supported from 5.0

Description

Re-scales a bitmap.

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

Derivation

CBaseBase class for all classes to be instantiated on the heap
CMdaBitmapScalerRe-scales a bitmap

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

Inherited from CBase:
operator new()


Construction


NewL()

static 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*

Pointer to the new image scaler object.

[Top]


Control


ScaleL()

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

Description

Begins the bitmap re-scaling operation. The scaling factor is based either on:

or

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& aSrcBitmap

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

CFbsBitmap& aTgtBitmap

If specified, the target location for the re-scaled bitmap.

TSize aDestSize

If specified, the requested target size for the re-scaled bitmap. If not specified, the target size for the re-scaled bitmap is the size of aTgtBitmap.

TBool aMaintainAspectRatio = ETrue

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()

void CancelScaling();

Description

Cancels the bitmap re-scaling operation.

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