epoc32/include/imageprocessor/imageprocessoroverlay.h
branchSymbian3
changeset 4 837f303aceeb
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
       
     1 // Copyright (c) 2008-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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @publishedAll 
       
    19  @released 
       
    20 */
       
    21 
       
    22 #ifndef __IMAGE_PROCESSOR_OVERLAY_H__
       
    23 #define __IMAGE_PROCESSOR_OVERLAY_H__
       
    24 
       
    25 #include <e32base.h>
       
    26 #include <gdi.h>
       
    27 
       
    28 class CFbsBitmap;
       
    29 class CImageFrame;
       
    30 class RFile;
       
    31 class TMMSource;
       
    32 
       
    33 namespace ImageProcessor
       
    34 	{
       
    35 
       
    36 class CImageProcessorImpl;
       
    37 class CImageProcessorDrmInput;
       
    38 	
       
    39 namespace Plugin
       
    40 	{
       
    41 	class MOverlay;
       
    42 	}
       
    43 
       
    44 /**
       
    45 This class provides image overlay functionality.
       
    46 
       
    47 Before overlay effects are applied, SetInputL should be called to specify the input overlay image.
       
    48 
       
    49 The overlay effect can be applied by:
       
    50 
       
    51 -# Begin overlay by calling BeginL(). 
       
    52 -# Adjust overlay parameters (optional) by calling SetL(aSize, aPosition, aAngle), possibly several times.
       
    53 -# Signal final placement of overlay by calling EndL(). 
       
    54 	.
       
    55 
       
    56 Between step 1 and 3, no other effects or operations may be carried out i.e. the overlay has to be 
       
    57 concluded/ended before proceeding to apply other effects.
       
    58 
       
    59 @publishedAll
       
    60 @released
       
    61 */
       
    62 class TOverlay
       
    63 	{
       
    64 public:
       
    65 	IMPORT_C void SupportedInputFormatsL(RArray<TUid>& aFormats) const;
       
    66 	IMPORT_C void SupportedInputSubFormatsL(TUid aFormat, RArray<TUid>& aSubFormats) const;
       
    67 	IMPORT_C void SupportedInputImageFrameFormatsL(RArray<TUid>& aFormats) const;
       
    68 	IMPORT_C void SupportedInputDisplayModesL(RArray<TDisplayMode>& aDisplayModes) const;
       
    69 	
       
    70 	IMPORT_C void SetInputL(const TDesC& aFilename, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
       
    71 	IMPORT_C void SetInputL(RFile& aFile, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
       
    72 	IMPORT_C void SetInputL(TMMSource& aDrmFile, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
       
    73 	IMPORT_C void SetInputL(const TDesC8& aBuffer, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
       
    74 	IMPORT_C void SetInputL(const CFbsBitmap& aBitmap, const CFbsBitmap* aMask = NULL);
       
    75 	IMPORT_C void SetInputL(const CImageFrame& aPixelBuffer);
       
    76 
       
    77 	IMPORT_C void BeginL();
       
    78 	IMPORT_C void SetL(const TSize &aSize, const TPoint &aPosition = TPoint(0,0), TReal32 aAngle = 0);
       
    79 	IMPORT_C void SetL(TReal32 aScaleX = 1.0, TReal32 aScaleY = 1.0, const TPoint &aPosition = TPoint(0,0), TReal32 aAngle = 0);
       
    80 	IMPORT_C void EndL();
       
    81 	IMPORT_C void ResetL();
       
    82 	
       
    83 	IMPORT_C TPoint	PositionL() const;
       
    84 	IMPORT_C TSize	SizeL() const;
       
    85 	IMPORT_C TReal32 AngleL() const;
       
    86 	IMPORT_C void GetScaleL(TReal32& aScaleX, TReal32& aScaleY) const;
       
    87 		
       
    88 private:
       
    89 	friend class CImageProcessorImpl;
       
    90 	TOverlay(Plugin::MOverlay& aOverlayImpl, CImageProcessorImpl& aImageProcessorImpl);
       
    91 	
       
    92 	TBool iIsActive;
       
    93 	TBool iIsInputSet;
       
    94 
       
    95 	CImageProcessorImpl& iImageProcessorImpl;
       
    96 	Plugin::MOverlay& iOverlayImpl;
       
    97 	TInt iReserved; // future proof
       
    98 	};
       
    99 
       
   100 	}
       
   101 
       
   102 #endif //__IMAGE_PROCESSOR_PREVIEW_H__