ImageProcessor::TOverlay Class Reference

class ImageProcessor::TOverlay

This class provides image overlay functionality.

Before overlay effects are applied, SetInputL should be called to specify the input overlay image.

The overlay effect can be applied by:

  1. Begin overlay by calling BeginL() .

  2. Adjust overlay parameters (optional) by calling SetL(aSize, aPosition, aAngle), possibly several times.

  3. Signal final placement of overlay by calling EndL() . Between step 1 and 3, no other effects or operations may be carried out i.e. the overlay has to be concluded/ended before proceeding to apply other effects.

Public Member Functions
IMPORT_C TReal32 AngleL ()
IMPORT_C void BeginL ()
IMPORT_C void EndL ()
IMPORT_C void GetScaleL ( TReal32 &, TReal32 &)
IMPORT_C TPoint PositionL ()
IMPORT_C void ResetL ()
IMPORT_C void SetInputL (const TDesC &, const TUid &, const TUid &)
IMPORT_C void SetInputL ( RFile &, const TUid &, const TUid &)
IMPORT_C void SetInputL ( TMMSource &, const TUid &, const TUid &)
IMPORT_C void SetInputL (const TDesC8 &, const TUid &, const TUid &)
IMPORT_C void SetInputL (const CFbsBitmap &, const CFbsBitmap *)
IMPORT_C void SetInputL (const CImageFrame &)
IMPORT_C void SetL (const TSize &, const TPoint &, TReal32 )
IMPORT_C void SetL ( TReal32 , TReal32 , const TPoint &, TReal32 )
IMPORT_C TSize SizeL ()
IMPORT_C void SupportedInputDisplayModesL ( RArray < TDisplayMode > &)
IMPORT_C void SupportedInputFormatsL ( RArray < TUid > &)
IMPORT_C void SupportedInputImageFrameFormatsL ( RArray < TUid > &)
IMPORT_C void SupportedInputSubFormatsL ( TUid , RArray < TUid > &)
Private Member Functions
TOverlay ( Plugin::MOverlay &, CImageProcessorImpl &)
Private Attributes
CImageProcessorImpl & iImageProcessorImpl
TBool iIsActive
TBool iIsInputSet
Plugin::MOverlay & iOverlayImpl
TInt iReserved

Constructor & Destructor Documentation

TOverlay(Plugin::MOverlay &, CImageProcessorImpl &)

TOverlay ( Plugin::MOverlay & aOverlayImpl,
CImageProcessorImpl & aImageProcessorImpl
) [private]

Parameters

Plugin::MOverlay & aOverlayImpl
CImageProcessorImpl & aImageProcessorImpl

Member Functions Documentation

AngleL()

IMPORT_C TReal32 AngleL ( ) const

Gets the angle of the overlay image.

leave
Other A range of system wide error codes.

BeginL()

IMPORT_C void BeginL ( )

First step of the three stages overlay BeginL() /SetL()/EndL(). The state of the ImageProcessor is set to EEffectActive.

leave
KErrNotReady The state of the ImageProcessor is not EInitialized or overlay is already begun.
leave
Other A range of system wide error codes.

EndL()

IMPORT_C void EndL ( )

Last step of the three stages overlay BeginL() /SetL()/EndL(). The state of the ImageProcessor is set to EInitialized.

leave
KErrNotReady BeginL() hasn't been called to create the overlay.
leave
Other A range of system wide error codes.

GetScaleL(TReal32 &, TReal32 &)

IMPORT_C void GetScaleL ( TReal32 & aScaleX,
TReal32 & aScaleY
) const

Gets the scale of the overlay image.

leave
Other A range of system wide error codes.

Parameters

TReal32 & aScaleX The scale of the overlay image width.
TReal32 & aScaleY The scale of the overlay image height.

PositionL()

IMPORT_C TPoint PositionL ( ) const

Gets the geometric centre position of the overlay image.

leave
Other A range of system wide error codes.

ResetL()

IMPORT_C void ResetL ( )

Resets the overlay parameters and state.

leave
Other A range of system wide error codes.

SetInputL(const TDesC &, const TUid &, const TUid &)

IMPORT_C void SetInputL ( const TDesC & aFilename,
const TUid & aFormat = KNullUid,
const TUid & aSubFormat = KNullUid
)

Specifies the file name and format of the overlay image. The input must be set only once and after the BeginL() is done. So, the SetInputL() must be called only once between BeginL() and EndL() .

leave
KErrNotReady BeginL() hasn't been called to create overlay.
leave
KErrNotSupported The aSubFormat is not NULL.
leave
KErrArgument The file name length is longer than KMaxFileName.
leave
Other A range of system wide error codes.

Parameters

const TDesC & aFilename The file name of the overlay image.
const TUid & aFormat = KNullUid The format of the overlay image.
const TUid & aSubFormat = KNullUid The sub format of the overlay image. Currently is not supported, shoud set to KNullUid.

SetInputL(RFile &, const TUid &, const TUid &)

IMPORT_C void SetInputL ( RFile & aFile,
const TUid & aFormat = KNullUid,
const TUid & aSubFormat = KNullUid
)

Specifies the file pointer and format of the overlay image. The input must be set only once and after the BeginL() is done. So, the SetInputL() must be called only once between BeginL() and EndL() .

leave
KErrNotSupported Always. Current this function is not supported.

Parameters

RFile & aFile The pointer to the file of the overlay image.
const TUid & aFormat = KNullUid The format of the overlay image.
const TUid & aSubFormat = KNullUid The sub format of the overlay image. Currently is not supported, shoud set to KNullUid.

SetInputL(TMMSource &, const TUid &, const TUid &)

IMPORT_C void SetInputL ( TMMSource & aDrmFile,
const TUid & aFormat = KNullUid,
const TUid & aSubFormat = KNullUid
)

Specifies the file pointer and format of the overlay image which is a DRM protected content source. The input must be set only once and after the BeginL() is done. So, the SetInputL() must be called only once between BeginL() and EndL() .

leave
KErrNotSupported Always. Current this function is not supported.

Parameters

TMMSource & aDrmFile The pointer to the DRM file of the overlay image.
const TUid & aFormat = KNullUid The format of the overlay image.
const TUid & aSubFormat = KNullUid The sub format of the overlay image. Currently is not supported, shoud set to KNullUid.

SetInputL(const TDesC8 &, const TUid &, const TUid &)

IMPORT_C void SetInputL ( const TDesC8 & aBuffer,
const TUid & aFormat = KNullUid,
const TUid & aSubFormat = KNullUid
)

Specifies the buffer pointer and format of the overlay image. The input must be set only once and after the BeginL() is done. So, the SetInputL() must be called only once between BeginL() and EndL() .

leave
KErrNotReady BeginL() hasn't been called to create the overlay.
leave
KErrNotSupported The aSubFormat is not NULL.
leave
Other A range of system wide error codes.

Parameters

const TDesC8 & aBuffer The pointer to the buffer of the overlay image.
const TUid & aFormat = KNullUid The format of the overlay image.
const TUid & aSubFormat = KNullUid The sub format of the overlay image. Currently is not supported, shoud set to KNullUid.

SetInputL(const CFbsBitmap &, const CFbsBitmap *)

IMPORT_C void SetInputL ( const CFbsBitmap & aBitmap,
const CFbsBitmap * aMask = NULL
)

Specifies the bitmap and mask of the overlay image. Source bitmap must not be deleted or changed during lifetime of TOverlay instance. The input must be set only once and after the BeginL() is done. So, the SetInputL() must be called only once between BeginL() and EndL() .

leave
KErrNotReady BeginL() hasn't been called to create the overlay.
leave
KErrNotSupported The aMask is not NULL.
leave
Other A range of system wide error codes.

Parameters

const CFbsBitmap & aBitmap The pointer to the bitmap of the overlay image.
const CFbsBitmap * aMask = NULL The mask of the overlay image. Currently not supported, mush be NULL.

SetInputL(const CImageFrame &)

IMPORT_C void SetInputL ( const CImageFrame & aPixelBuffer )

Specifies the binary image data of the overlay image. Source image frame buffer must not be deleted or changed during lifetime of TOverlay instance. The input must be set only once and after the BeginL() is done. So, the SetInputL() must be called only once between BeginL() and EndL() .

leave
KErrNotReady BeginL() hasn't been called to create the overlay.
leave
Other A range of system wide error codes.

Parameters

const CImageFrame & aPixelBuffer The CImageFrame type pointer of the overlay image.

SetL(const TSize &, const TPoint &, TReal32)

IMPORT_C void SetL ( const TSize & aSize,
const TPoint & aPosition =  TPoint (0, 0),
TReal32 aAngle = 0
)

Second step of the three stages overlay BeginL() /SetL()/EndL(). Specifies the size, geometric centre position and angle of the overlay image.

leave
KErrNotReady BeginL() hasn't been called to create the overlay.
leave
KErrArgument Width or height of aSize is less than 0.
leave
KErrArgument aSize does not preserve aspect ratio and the plugin implementation supports scaling with aspect ratio preserved only.
leave
Other A range of system wide error codes.

Parameters

const TSize & aSize The size of the overlay image.
const TPoint & aPosition =  TPoint (0, 0) The position of the overlay image geometric centre.
TReal32 aAngle = 0 The angle of the overlay image.

SetL(TReal32, TReal32, const TPoint &, TReal32)

IMPORT_C void SetL ( TReal32 aScaleX = 1.0,
TReal32 aScaleY = 1.0,
const TPoint & aPosition =  TPoint (0, 0),
TReal32 aAngle = 0
)

Second step of the three stages overlay BeginL() /SetL()/EndL(). Specifies the scale, geometric centre position and angle of the overlay image.

leave
KErrArgument Scale is less than 0 or equal to 0
leave
KErrArgument aScaleX and aScaleY are not equal and the plugin implementation supports scaling with aspect ratio preserved only.
leave
KErrNotReady BeginL() hasn't been called to create the overlay.
leave
Other A range of system wide error codes.

Parameters

TReal32 aScaleX = 1.0 The scale of the overlay image width.
TReal32 aScaleY = 1.0 The scale of the overlay image height.
const TPoint & aPosition =  TPoint (0, 0) The position of the overlay image geometric centre.
TReal32 aAngle = 0 The angle of the overlay image.

SizeL()

IMPORT_C TSize SizeL ( ) const

Gets the size of the overlay image.

leave
Other A range of system wide error codes.

SupportedInputDisplayModesL(RArray< TDisplayMode > &)

IMPORT_C void SupportedInputDisplayModesL ( RArray < TDisplayMode > & aDisplayModes ) const

Gets the supported overlay image display modes.

Parameters

RArray < TDisplayMode > & aDisplayModes The supported display modes of overlay image of ImageProcessor.

SupportedInputFormatsL(RArray< TUid > &)

IMPORT_C void SupportedInputFormatsL ( RArray < TUid > & aFormats ) const

Gets the supported overlay image formats.

Parameters

RArray < TUid > & aFormats The supported formats of ImageProcessor of the overlay image.

SupportedInputImageFrameFormatsL(RArray< TUid > &)

IMPORT_C void SupportedInputImageFrameFormatsL ( RArray < TUid > & aFormats ) const

Gets the supported overlay image frame formats.

Parameters

RArray < TUid > & aFormats The supported formats of overlay image of ImageProcessor.

SupportedInputSubFormatsL(TUid, RArray< TUid > &)

IMPORT_C void SupportedInputSubFormatsL ( TUid aFormat,
RArray < TUid > & aSubFormats
) const

Gets the supported overlay image sub formats.

Parameters

TUid aFormat The supported format of ImageProcessor of the overlay image.
RArray < TUid > & aSubFormats The supported sub formats of ImageProcessor of the overlay image.

Member Data Documentation

CImageProcessorImpl & iImageProcessorImpl

CImageProcessorImpl & iImageProcessorImpl [private]

TBool iIsActive

TBool iIsActive [private]

TBool iIsInputSet

TBool iIsInputSet [private]

Plugin::MOverlay & iOverlayImpl

Plugin::MOverlay & iOverlayImpl [private]

TInt iReserved

TInt iReserved [private]