epoc32/include/imageprocessor/imageprocessoroverlay.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@4
     2
// All rights reserved.
williamr@4
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@4
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     7
//
williamr@4
     8
// Initial Contributors:
williamr@4
     9
// Nokia Corporation - initial contribution.
williamr@4
    10
//
williamr@4
    11
// Contributors:
williamr@4
    12
//
williamr@4
    13
// Description:
williamr@4
    14
//
williamr@4
    15
williamr@4
    16
/**
williamr@4
    17
 @file
williamr@4
    18
 @publishedAll 
williamr@4
    19
 @released 
williamr@4
    20
*/
williamr@4
    21
williamr@4
    22
#ifndef __IMAGE_PROCESSOR_OVERLAY_H__
williamr@4
    23
#define __IMAGE_PROCESSOR_OVERLAY_H__
williamr@4
    24
williamr@4
    25
#include <e32base.h>
williamr@4
    26
#include <gdi.h>
williamr@4
    27
williamr@4
    28
class CFbsBitmap;
williamr@4
    29
class CImageFrame;
williamr@4
    30
class RFile;
williamr@4
    31
class TMMSource;
williamr@4
    32
williamr@4
    33
namespace ImageProcessor
williamr@4
    34
	{
williamr@4
    35
williamr@4
    36
class CImageProcessorImpl;
williamr@4
    37
class CImageProcessorDrmInput;
williamr@4
    38
	
williamr@4
    39
namespace Plugin
williamr@4
    40
	{
williamr@4
    41
	class MOverlay;
williamr@4
    42
	}
williamr@4
    43
williamr@4
    44
/**
williamr@4
    45
This class provides image overlay functionality.
williamr@4
    46
williamr@4
    47
Before overlay effects are applied, SetInputL should be called to specify the input overlay image.
williamr@4
    48
williamr@4
    49
The overlay effect can be applied by:
williamr@4
    50
williamr@4
    51
-# Begin overlay by calling BeginL(). 
williamr@4
    52
-# Adjust overlay parameters (optional) by calling SetL(aSize, aPosition, aAngle), possibly several times.
williamr@4
    53
-# Signal final placement of overlay by calling EndL(). 
williamr@4
    54
	.
williamr@4
    55
williamr@4
    56
Between step 1 and 3, no other effects or operations may be carried out i.e. the overlay has to be 
williamr@4
    57
concluded/ended before proceeding to apply other effects.
williamr@4
    58
williamr@4
    59
@publishedAll
williamr@4
    60
@released
williamr@4
    61
*/
williamr@4
    62
class TOverlay
williamr@4
    63
	{
williamr@4
    64
public:
williamr@4
    65
	IMPORT_C void SupportedInputFormatsL(RArray<TUid>& aFormats) const;
williamr@4
    66
	IMPORT_C void SupportedInputSubFormatsL(TUid aFormat, RArray<TUid>& aSubFormats) const;
williamr@4
    67
	IMPORT_C void SupportedInputImageFrameFormatsL(RArray<TUid>& aFormats) const;
williamr@4
    68
	IMPORT_C void SupportedInputDisplayModesL(RArray<TDisplayMode>& aDisplayModes) const;
williamr@4
    69
	
williamr@4
    70
	IMPORT_C void SetInputL(const TDesC& aFilename, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
williamr@4
    71
	IMPORT_C void SetInputL(RFile& aFile, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
williamr@4
    72
	IMPORT_C void SetInputL(TMMSource& aDrmFile, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
williamr@4
    73
	IMPORT_C void SetInputL(const TDesC8& aBuffer, const TUid& aFormat = KNullUid, const TUid& aSubFormat = KNullUid);
williamr@4
    74
	IMPORT_C void SetInputL(const CFbsBitmap& aBitmap, const CFbsBitmap* aMask = NULL);
williamr@4
    75
	IMPORT_C void SetInputL(const CImageFrame& aPixelBuffer);
williamr@4
    76
williamr@4
    77
	IMPORT_C void BeginL();
williamr@4
    78
	IMPORT_C void SetL(const TSize &aSize, const TPoint &aPosition = TPoint(0,0), TReal32 aAngle = 0);
williamr@4
    79
	IMPORT_C void SetL(TReal32 aScaleX = 1.0, TReal32 aScaleY = 1.0, const TPoint &aPosition = TPoint(0,0), TReal32 aAngle = 0);
williamr@4
    80
	IMPORT_C void EndL();
williamr@4
    81
	IMPORT_C void ResetL();
williamr@4
    82
	
williamr@4
    83
	IMPORT_C TPoint	PositionL() const;
williamr@4
    84
	IMPORT_C TSize	SizeL() const;
williamr@4
    85
	IMPORT_C TReal32 AngleL() const;
williamr@4
    86
	IMPORT_C void GetScaleL(TReal32& aScaleX, TReal32& aScaleY) const;
williamr@4
    87
		
williamr@4
    88
private:
williamr@4
    89
	friend class CImageProcessorImpl;
williamr@4
    90
	TOverlay(Plugin::MOverlay& aOverlayImpl, CImageProcessorImpl& aImageProcessorImpl);
williamr@4
    91
	
williamr@4
    92
	TBool iIsActive;
williamr@4
    93
	TBool iIsInputSet;
williamr@4
    94
williamr@4
    95
	CImageProcessorImpl& iImageProcessorImpl;
williamr@4
    96
	Plugin::MOverlay& iOverlayImpl;
williamr@4
    97
	TInt iReserved; // future proof
williamr@4
    98
	};
williamr@4
    99
williamr@4
   100
	}
williamr@4
   101
williamr@4
   102
#endif //__IMAGE_PROCESSOR_PREVIEW_H__