Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: BitmapTransforms.h
Link against: bitmaptransforms.lib

Class CBitmapRotator

class CBitmapRotator : public CBase;

Description

The public API for clients to call the BitmapTransforms Library bitmap rotation.

Derivation

Members

Defined in CBitmapRotator:
Cancel(), CustomCommand(), EMirrorHorizontalAxis, EMirrorVerticalAxis, ERotation180DegreesClockwise, ERotation270DegreesClockwise, ERotation90DegreesClockwise, NewL(), Rotate(), Rotate(), TRotationAngle, ~CBitmapRotator()

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


Construction and destruction


NewL()

static IMPORT_C CBitmapRotator *NewL();

Description

Constructs a CBitmapRotator object.

If any errors are encountered this function leaves with an appropriate leave code.

Return value

CBitmapRotator *

A pointer to a CBitmapRotator object.


~CBitmapRotator()

IMPORT_C ~CBitmapRotator();

Description

Default destructor for this class.

Frees all resources owned by the object prior to its destruction.

[Top]


Member functions


Rotate()

IMPORT_C void Rotate(TRequestStatus *aRequestStatus, CFbsBitmap &aSrcBitmap, CFbsBitmap &aTgtBitmap, TRotationAngle aAngle);

Pre-Condition

Description

Schedules a rotate/mirror operation on a bitmap supplied in the aSrcBitmap paramter and produces the output pointed to by aTgtBitmap. The CBitmapRotator is an active object and as such provides asynchronous operations. The result of the operation is pointed to by aRequestStatus.

Post-Condition

If successful aTgtBitmap contains the rotated bitmap and aRequestStatus points to the value KErrNone. If unsuccessful the bitmap supplied in aSrcBitmap will remain unaltered.

Parameters

TRequestStatus *aRequestStatus

A pointer to the completion status of the asynchronous operation.

CFbsBitmap &aSrcBitmap

This bitmap should have been created

CFbsBitmap &aTgtBitmap

This bitmap should have been created

TRotationAngle aAngle

A member of the enumeration TRotationAngle that specifies the rotation mirror operation.

Panic codes

ENoSourceBitmap

This function panics with TBitmapTransformsMain::ENoSourceBitmap when the aSrcBitmap has not been constructed ie. its handle is zero.


Rotate()

IMPORT_C void Rotate(TRequestStatus *aRequestStatus, CFbsBitmap &aBitmap, TRotationAngle aAngle);

Pre-Condition

Description

The function Rotate schedules a rotate/mirror operation on a bitmap supplied in the aBitmap whose output overwrites aBitmap. The result of the operation is pointed to by aRequestStatus.

Post-Condition

Parameters

TRequestStatus *aRequestStatus

A pointer to the completion status of the asynchronous operation.

CFbsBitmap &aBitmap

A reference to a CFbsBitmap. This bitmap should have been created and is also an output.

TRotationAngle aAngle

A member of the enumeration TRotationAngle that specifies the rotation mirror operation.

Panic codes

ENoSourceBitmap

This function panics with TBitmapTransformsMain::ENoSourceBitmap when the aSrcBitmap has not been constructed ie. its handle is 0.


CustomCommand()

IMPORT_C TInt CustomCommand(TUid aUid, TAny *aParam);

Pre-Condition

When a command requires parameters aParam is not NULL.

Description

Provides custom command capabilties on CBitmapRotator. The command is dispatched on aUid and if the command is not known KErrNotSupported will be returned. This function is synchronous.

Parameters

TUid aUid

The ID of the command.

TAny *aParam

The command specific information.

Return value

TInt


Cancel()

IMPORT_C void Cancel();

Description

Cancels any outstanding action.

[Top]


Member enumerations


Enum TRotationAngle

TRotationAngle

Description

The enumeration provides a set of supported rotation and mirror angles. TRotationAngle is an enumeration within the namespace CBitmapRotator.

ERotation90DegreesClockwise

Used to rotate a bitmap 90 degrees clockwise.

ERotation180DegreesClockwise

Used to rotate a bitmap 180 degrees clockwise.

ERotation270DegreesClockwise

Used to rotate a bitmap 270 degrees clockwise.

EMirrorHorizontalAxis

Used to mirror a bitmap about the horizontal axis.

EMirrorVerticalAxis

Used to mirror a bitmap about the vertical axis.