epoc32/include/bitmaptransforms.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/bitmaptransforms.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/bitmaptransforms.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,130 @@
     1.4 -bitmaptransforms.h
     1.5 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +// This is the public client API for the BitmapTransforms Library
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +#ifndef __BITMAPTRANSFORMS_H__
    1.23 +#define __BITMAPTRANSFORMS_H__
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <fbs.h>
    1.27 +#include <bitdev.h>
    1.28 +
    1.29 +class CBitmapRotatorBody;
    1.30 +class CBitmapScalerBody;
    1.31 +class CBitmapConverterBody;
    1.32 +
    1.33 +
    1.34 +/**
    1.35 +The public API for clients to call the BitmapTransforms Library bitmap rotation.
    1.36 +
    1.37 +@publishedAll
    1.38 +@released
    1.39 +*/
    1.40 +
    1.41 +//The public API for clients to call the BitmapTransforms Library bitmap rotation
    1.42 +class CBitmapRotator : public CBase
    1.43 +{
    1.44 +public:
    1.45 +
    1.46 +	/**
    1.47 +	The enumeration provides a set of supported rotation and mirror angles.
    1.48 +	TRotationAngle is an enumeration within the namespace CBitmapRotator.
    1.49 +	*/
    1.50 +	enum TRotationAngle
    1.51 +		{
    1.52 +		/** Used to rotate a bitmap 90 degrees clockwise.
    1.53 +		*/
    1.54 +		ERotation90DegreesClockwise,
    1.55 +		/** Used to rotate a bitmap 180 degrees clockwise.
    1.56 +		*/
    1.57 +		ERotation180DegreesClockwise,
    1.58 +		/** Used to rotate a bitmap 270 degrees clockwise.
    1.59 +		*/
    1.60 +		ERotation270DegreesClockwise,
    1.61 +		/** Used to mirror a bitmap about the horizontal axis.
    1.62 +		*/
    1.63 +		EMirrorHorizontalAxis,
    1.64 +		/** Used to mirror a bitmap about the vertical axis.
    1.65 +		*/
    1.66 +		EMirrorVerticalAxis
    1.67 +		};
    1.68 +
    1.69 +public:
    1.70 +	IMPORT_C static CBitmapRotator* NewL();
    1.71 +	IMPORT_C ~CBitmapRotator();
    1.72 +	IMPORT_C void Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TRotationAngle aAngle);
    1.73 +	IMPORT_C void Rotate(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, TRotationAngle aAngle);
    1.74 +	IMPORT_C TInt CustomCommand(TUid aUid, TAny* aParam);
    1.75 +	IMPORT_C void Cancel();
    1.76 +
    1.77 +private:
    1.78 +	CBitmapRotator();
    1.79 +	void ConstructL();
    1.80 +
    1.81 +private:
    1.82 +	CBitmapRotatorBody	*iBody;
    1.83 +};
    1.84 +
    1.85 +/**
    1.86 +The public API for clients to call the BitmapTransforms Library bitmap scaling.
    1.87 +
    1.88 +@publishedAll
    1.89 +@released
    1.90 +*/
    1.91 +
    1.92 +//The public API for clients to call the BitmapTransforms library bitmap scaling
    1.93 +class CBitmapScaler : public CBase
    1.94 +{
    1.95 +public:
    1.96 +	/** An enumeration to specify the level of quality algorithm.
    1.97 +	*/
    1.98 +	enum TQualityAlgorithm
    1.99 +		{
   1.100 +		/**
   1.101 +		Fastest/lowest quality
   1.102 +		*/
   1.103 +		EMinimumQuality,
   1.104 +		/**
   1.105 +		Middle range speed/middle range quality
   1.106 +		*/
   1.107 +		EMediumQuality,
   1.108 +		/**
   1.109 +		Slowest/highest quality
   1.110 +		*/
   1.111 +		EMaximumQuality
   1.112 +		};
   1.113 +
   1.114 +public:
   1.115 +	IMPORT_C static CBitmapScaler* NewL();
   1.116 +	IMPORT_C ~CBitmapScaler();
   1.117 +	IMPORT_C void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aSrcBitmap, CFbsBitmap& aTgtBitmap, TBool aMaintainAspectRatio = ETrue);
   1.118 +	IMPORT_C void Scale(TRequestStatus* aRequestStatus, CFbsBitmap& aBitmap, const TSize& aDestinationSize, TBool aMaintainAspectRatio = ETrue);
   1.119 +	IMPORT_C void Cancel();
   1.120 +	IMPORT_C TInt CustomCommand(TUid aUid, TAny* aParam);
   1.121 +    inline TInt DisablePostProcessing( TBool aState );
   1.122 +	inline TInt UseLowMemoryAlgorithm( TBool aState );
   1.123 +	inline TInt SetQualityAlgorithm( TQualityAlgorithm aQualityLevel );
   1.124 +private:
   1.125 +	CBitmapScaler();
   1.126 +	void ConstructL();
   1.127 +
   1.128 +private:
   1.129 +	CBitmapScalerBody* iBody;
   1.130 +	};
   1.131 +
   1.132 +#include <bitmaptransforms.inl>
   1.133 +
   1.134 +#endif //__BITMAPTRANSFORMS_H__