epoc32/include/imagetransform.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
--- a/epoc32/include/imagetransform.h	Wed Mar 31 12:27:01 2010 +0100
+++ b/epoc32/include/imagetransform.h	Wed Mar 31 12:33:34 2010 +0100
@@ -1,9 +1,9 @@
 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
-// 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
+// under the terms of "Eclipse Public License v1.0"
 // which accompanies this distribution, and is available
-// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
 //
 // Initial Contributors:
 // Nokia Corporation - initial contribution.
@@ -14,6 +14,7 @@
 // This is the public client API for the Image Transform Library
 // 
 //
+
 /**
  @file
  @publishedAll
@@ -25,11 +26,11 @@
 
 #include <e32base.h>
 #include <fbs.h>
-
 // fwd refs
 class CImageTransformFramework;	//fwd ref
 class CImageTransformPluginExtension;
 
+	
 /**
 The public API for clients to call the Image Transform (scaling) library.
 This class provides functions to scale images held in files or descriptors.
@@ -63,7 +64,51 @@
 		*/
 		EEnumBoundary = 0x04
 		};
-
+	/**
+	Flags to specify the desired transformations. 
+	If no flag or "EScale" flag is set then the framework will look for the plugins 
+	supporting scaling which includes all the plugins supporting 
+	version-1 opaque data and the plugins supporting version-2 opaque 
+	data with the scaling flag set.
+	A plug-in supporting Squeeze, Orientation and Overlay in a single transform
+	must perform these transformation in the order: Overlaying, Orientation and then
+	Squeezing
+	*/
+	enum TTransformations
+		{
+		/** 
+		No transformation set
+		*/
+		ETransformationNone = 0x00,
+		/**
+		If set, the image is scaled based on the parameter passed in SetDestSizeInPixelsL(). 
+		*/
+		EScale = 0x01,
+		/**
+		If set, the image is clipped based on the parameter passed in SetSourceRect(). 
+		*/
+		ECrop = 0x02,
+		/**
+		If set, the image is squeezed
+		*/			
+		ESqueeze = 0x04,
+		/**
+		If set, the image is oriented 
+		*/			
+		EOrientation = 0x08,
+		/**
+		If set, the image is blend with the overlay image
+		*/
+		EOverlay = 0x10,
+		/**
+		If set, the plugin having exif extension is looked for
+		*/
+		EExif = 0x20,
+		/**
+		TTransformations should not be set greater than or equal to this value 
+		*/
+		ETransformEnumBoundary = 0x40
+		};
 public:
 	IMPORT_C static CImageTransform* NewL(RFs& aFs);
 	IMPORT_C ~CImageTransform();
@@ -78,7 +123,7 @@
 	IMPORT_C void SetDestFilenameL(const TDesC& aFilename);
 	IMPORT_C void SetDestDataL(HBufC8*& aData);
 	IMPORT_C void SetDestSizeInPixelsL(const TSize& aDestinationSize, TBool aMaintainAspectRatio = ETrue);
-
+	
 	IMPORT_C void SetOptionsL(TUint aOptions);
 	IMPORT_C void SetPreserveImageData(TBool aPreserveImageData);
 
@@ -87,7 +132,8 @@
 	IMPORT_C void CancelTransform();
 	IMPORT_C void Reset();
 	IMPORT_C CImageTransformPluginExtension* Extension() const;
-
+	IMPORT_C CImageTransformPluginExtension* Extension(TUid aExtensionUid, TInt& aError) const;
+	IMPORT_C void SetTransformationsL(TUint aTransformations);
 private:
 	CImageTransform();
 	void ConstructL(RFs& aFs);