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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef __IMAGE_PROCESSOR_OVERLAY_H__
23 #define __IMAGE_PROCESSOR_OVERLAY_H__
33 namespace ImageProcessor
36 class CImageProcessorImpl;
37 class CImageProcessorDrmInput;
45 This class provides image overlay functionality.
47 Before overlay effects are applied, SetInputL should be called to specify the input overlay image.
49 The overlay effect can be applied by:
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().
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.
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;
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);
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);
81 IMPORT_C void ResetL();
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;
89 friend class CImageProcessorImpl;
90 TOverlay(Plugin::MOverlay& aOverlayImpl, CImageProcessorImpl& aImageProcessorImpl);
95 CImageProcessorImpl& iImageProcessorImpl;
96 Plugin::MOverlay& iOverlayImpl;
97 TInt iReserved; // future proof
102 #endif //__IMAGE_PROCESSOR_PREVIEW_H__