CBitmapRotator Class Reference

#include <bitmaptransforms.h>

Link against: bitmaptransforms.lib

class CBitmapRotator : public CBase

Inherits from

Detailed Description

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

Member Enumeration Documentation

Enum TRotationAngle

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

EnumeratorValueDescription
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.

Constructor & Destructor Documentation

~CBitmapRotator ( )

IMPORT_C~CBitmapRotator()

Default destructor for this class.

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

Member Function Documentation

Cancel ( )

IMPORT_C voidCancel()

Cancels any outstanding action.

CustomCommand ( TUid, TAny * )

IMPORT_C TIntCustomCommand(TUidaUid,
TAny *aParam
)

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.

Pre-condition
When a command requires parameters aParam is not NULL.
Parameters
aUidThe ID of the command.
aParamThe command specific information.

NewL ( )

IMPORT_C CBitmapRotator *NewL()[static]

Constructs a CBitmapRotator object.

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

Return Value
A pointer to a CBitmapRotator object.

Rotate ( TRequestStatus *, CFbsBitmap &, CFbsBitmap &, TRotationAngle )

IMPORT_C voidRotate(TRequestStatus *aRequestStatus,
CFbsBitmap &aSrcBitmap,
CFbsBitmap &aTgtBitmap,
TRotationAngleaAngle
)

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.

Pre-condition
  • aRequestStatus is not a NULL pointer.

  • aSrcBitmap is a fully constructed bitmap of unknown size including zero dimension

  • aTgtBitmap is a fully constructed bitmap of unknown size including zero dimension

  • aAngle is a member of the enumeration TRotationAngle.

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
aRequestStatusA pointer to the completion status of the asynchronous operation.
aSrcBitmapThis bitmap should have been created
aTgtBitmapThis bitmap should have been created
aAngleA member of the enumeration TRotationAngle that specifies the rotation mirror operation.
Panic Codes
ENoSourceBitmapThis function panics with TBitmapTransformsMain::ENoSourceBitmap when the aSrcBitmap has not been constructed ie. its handle is zero.

Rotate ( TRequestStatus *, CFbsBitmap &, TRotationAngle )

IMPORT_C voidRotate(TRequestStatus *aRequestStatus,
CFbsBitmap &aBitmap,
TRotationAngleaAngle
)

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.

Pre-condition
  • aRequestStatus is not a NULL pointer.

  • aBitmap is a fully constructed bitmap of unknown size including zero dimension.

  • aAngle is a member of the enumeration TRotationAngle.

Post-condition
  • aBitmap contains the rotated bitmap.

  • aRequestStatus points to the value KErrorNone.

Parameters
aRequestStatusA pointer to the completion status of the asynchronous operation.
aBitmapA reference to a CFbsBitmap. This bitmap should have been created and is also an output.
aAngleA member of the enumeration TRotationAngle that specifies the rotation mirror operation.
Panic Codes
ENoSourceBitmapThis function panics with TBitmapTransformsMain::ENoSourceBitmap when the aSrcBitmap has not been constructed ie. its handle is 0.