1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // This is the public client API for the BitmapTransforms Library
18 #ifndef __BITMAPTRANSFORMS_H__
19 #define __BITMAPTRANSFORMS_H__
25 class CBitmapRotatorBody;
26 class CBitmapScalerBody;
27 class CBitmapConverterBody;
31 The public API for clients to call the BitmapTransforms Library bitmap rotation.
37 //The public API for clients to call the BitmapTransforms Library bitmap rotation
38 class CBitmapRotator : public CBase
43 The enumeration provides a set of supported rotation and mirror angles.
44 TRotationAngle is an enumeration within the namespace CBitmapRotator.
48 /** Used to rotate a bitmap 90 degrees clockwise.
50 ERotation90DegreesClockwise,
51 /** Used to rotate a bitmap 180 degrees clockwise.
53 ERotation180DegreesClockwise,
54 /** Used to rotate a bitmap 270 degrees clockwise.
56 ERotation270DegreesClockwise,
57 /** Used to mirror a bitmap about the horizontal axis.
59 EMirrorHorizontalAxis,
60 /** Used to mirror a bitmap about the vertical axis.
66 IMPORT_C static CBitmapRotator* NewL();
67 IMPORT_C ~CBitmapRotator();
68 IMPORT_C void Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TRotationAngle aAngle);
69 IMPORT_C void Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, TRotationAngle aAngle);
70 IMPORT_C TInt CustomCommand(TUid aUid, TAny* aParam);
71 IMPORT_C void Cancel();
78 CBitmapRotatorBody *iBody;
82 The public API for clients to call the BitmapTransforms Library bitmap scaling.
88 //The public API for clients to call the BitmapTransforms library bitmap scaling
89 class CBitmapScaler : public CBase
92 /** An enumeration to specify the level of quality algorithm.
94 enum TQualityAlgorithm
97 Fastest/lowest quality
101 Middle range speed/middle range quality
105 Slowest/highest quality
111 IMPORT_C static CBitmapScaler* NewL();
112 IMPORT_C ~CBitmapScaler();
113 IMPORT_C void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TBool aMaintainAspectRatio = ETrue);
114 IMPORT_C void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, const TSize& aDestinationSize, TBool aMaintainAspectRatio = ETrue);
115 IMPORT_C void Cancel();
116 IMPORT_C TInt CustomCommand(TUid aUid, TAny* aParam);
117 inline TInt DisablePostProcessing( TBool aState );
118 inline TInt UseLowMemoryAlgorithm( TBool aState );
119 inline TInt SetQualityAlgorithm( TQualityAlgorithm aQualityLevel );
125 CBitmapScalerBody* iBody;
128 #include <bitmaptransforms.inl>
130 #endif //__BITMAPTRANSFORMS_H__