1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/imageprocessor/imageprocessoroverlay.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,102 @@
1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @publishedAll
1.22 + @released
1.23 +*/
1.24 +
1.25 +#ifndef __IMAGE_PROCESSOR_OVERLAY_H__
1.26 +#define __IMAGE_PROCESSOR_OVERLAY_H__
1.27 +
1.28 +#include <e32base.h>
1.29 +#include <gdi.h>
1.30 +
1.31 +class CFbsBitmap;
1.32 +class CImageFrame;
1.33 +class RFile;
1.34 +class TMMSource;
1.35 +
1.36 +namespace ImageProcessor
1.37 + {
1.38 +
1.39 +class CImageProcessorImpl;
1.40 +class CImageProcessorDrmInput;
1.41 +
1.42 +namespace Plugin
1.43 + {
1.44 + class MOverlay;
1.45 + }
1.46 +
1.47 +/**
1.48 +This class provides image overlay functionality.
1.49 +
1.50 +Before overlay effects are applied, SetInputL should be called to specify the input overlay image.
1.51 +
1.52 +The overlay effect can be applied by:
1.53 +
1.54 +-# Begin overlay by calling BeginL().
1.55 +-# Adjust overlay parameters (optional) by calling SetL(aSize, aPosition, aAngle), possibly several times.
1.56 +-# Signal final placement of overlay by calling EndL().
1.57 + .
1.58 +
1.59 +Between step 1 and 3, no other effects or operations may be carried out i.e. the overlay has to be
1.60 +concluded/ended before proceeding to apply other effects.
1.61 +
1.62 +@publishedAll
1.63 +@released
1.64 +*/
1.65 +class TOverlay
1.66 + {
1.67 +public:
1.68 + IMPORT_C void SupportedInputFormatsL(RArray<TUid>& aFormats) const;
1.69 + IMPORT_C void SupportedInputSubFormatsL(TUid aFormat, RArray<TUid>& aSubFormats) const;
1.70 + IMPORT_C void SupportedInputImageFrameFormatsL(RArray<TUid>& aFormats) const;
1.71 + IMPORT_C void SupportedInputDisplayModesL(RArray<TDisplayMode>& aDisplayModes) const;
1.72 +
1.73 + IMPORT_C void SetInputL(const TDesC& aFilename, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
1.74 + IMPORT_C void SetInputL(RFile& aFile, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
1.75 + IMPORT_C void SetInputL(TMMSource& aDrmFile, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
1.76 + IMPORT_C void SetInputL(const TDesC8& aBuffer, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
1.77 + IMPORT_C void SetInputL(const CFbsBitmap& aBitmap, const CFbsBitmap* aMask = NULL);
1.78 + IMPORT_C void SetInputL(const CImageFrame& aPixelBuffer);
1.79 +
1.80 + IMPORT_C void BeginL();
1.81 + IMPORT_C void SetL(const TSize &aSize, const TPoint &aPosition = TPoint(0,0), TReal32 aAngle = 0);
1.82 + IMPORT_C void SetL(TReal32 aScaleX = 1.0, TReal32 aScaleY = 1.0, const TPoint &aPosition = TPoint(0,0), TReal32 aAngle = 0);
1.83 + IMPORT_C void EndL();
1.84 + IMPORT_C void ResetL();
1.85 +
1.86 + IMPORT_C TPoint PositionL() const;
1.87 + IMPORT_C TSize SizeL() const;
1.88 + IMPORT_C TReal32 AngleL() const;
1.89 + IMPORT_C void GetScaleL(TReal32& aScaleX, TReal32& aScaleY) const;
1.90 +
1.91 +private:
1.92 + friend class CImageProcessorImpl;
1.93 + TOverlay(Plugin::MOverlay& aOverlayImpl, CImageProcessorImpl& aImageProcessorImpl);
1.94 +
1.95 + TBool iIsActive;
1.96 + TBool iIsInputSet;
1.97 +
1.98 + CImageProcessorImpl& iImageProcessorImpl;
1.99 + Plugin::MOverlay& iOverlayImpl;
1.100 + TInt iReserved; // future proof
1.101 + };
1.102 +
1.103 + }
1.104 +
1.105 +#endif //__IMAGE_PROCESSOR_PREVIEW_H__