ImageProcessor::TOverlay Class Reference

#include <imageprocessor/imageprocessoroverlay.h>

Link against: imageprocessor.lib

class ImageProcessor::TOverlay
Public Member Functions
IMPORT_C TReal32AngleL()
IMPORT_C voidBeginL()
IMPORT_C voidEndL()
IMPORT_C voidGetScaleL(TReal32 &, TReal32 &)
IMPORT_C TPointPositionL()
IMPORT_C voidResetL()
IMPORT_C voidSetInputL(const TDesC &, const TUid &, const TUid &)
IMPORT_C voidSetInputL(RFile &, const TUid &, const TUid &)
IMPORT_C voidSetInputL(TMMSource &, const TUid &, const TUid &)
IMPORT_C voidSetInputL(const TDesC8 &, const TUid &, const TUid &)
IMPORT_C voidSetInputL(const CFbsBitmap &, const CFbsBitmap *)
IMPORT_C voidSetInputL(const CImageFrame &)
IMPORT_C voidSetL(const TSize &, const TPoint &, TReal32)
IMPORT_C voidSetL(TReal32, TReal32, const TPoint &, TReal32)
IMPORT_C TSizeSizeL()
IMPORT_C voidSupportedInputDisplayModesL(RArray< TDisplayMode > &)
IMPORT_C voidSupportedInputFormatsL(RArray< TUid > &)
IMPORT_C voidSupportedInputImageFrameFormatsL(RArray< TUid > &)
IMPORT_C voidSupportedInputSubFormatsL(TUid, RArray< TUid > &)

Detailed Description

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.

Member Function Documentation

AngleL ( )

IMPORT_C TReal32AngleL()const

Gets the angle of the overlay image.

Return Value
The angle of the overlay image.
Leave Codes
OtherA range of system wide error codes.

BeginL ( )

IMPORT_C voidBeginL()

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

Leave Codes
KErrNotReadyThe state of the ImageProcessor is not EInitialized or overlay is already begun.
OtherA range of system wide error codes.

EndL ( )

IMPORT_C voidEndL()

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

Leave Codes
KErrNotReady
OtherA range of system wide error codes.

GetScaleL ( TReal32 &, TReal32 & )

IMPORT_C voidGetScaleL(TReal32 &aScaleX,
TReal32 &aScaleY
)const

Gets the scale of the overlay image.

Parameters
aScaleXThe scale of the overlay image width.
aScaleYThe scale of the overlay image height.
Leave Codes
OtherA range of system wide error codes.

PositionL ( )

IMPORT_C TPointPositionL()const

Gets the geometric centre position of the overlay image.

Return Value
The position of the overlay image geometric centre.
Leave Codes
OtherA range of system wide error codes.

ResetL ( )

IMPORT_C voidResetL()

Resets the overlay parameters and state.

Leave Codes
OtherA range of system wide error codes.

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

IMPORT_C voidSetInputL(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().

Parameters
aFilenameThe file name of the overlay image.
aFormatThe format of the overlay image.
aSubFormatThe sub format of the overlay image. Currently is not supported, shoud set to KNullUid.
Leave Codes
KErrNotReady
KErrNotSupportedThe aSubFormat is not NULL.
KErrArgumentThe file name length is longer than KMaxFileName.
OtherA range of system wide error codes.

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

IMPORT_C voidSetInputL(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().

Parameters
aFileThe pointer to the file of the overlay image.
aFormatThe format of the overlay image.
aSubFormatThe sub format of the overlay image. Currently is not supported, shoud set to KNullUid.
Leave Codes
KErrNotSupportedAlways. Current this function is not supported.

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

IMPORT_C voidSetInputL(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().

Parameters
aDrmFileThe pointer to the DRM file of the overlay image.
aFormatThe format of the overlay image.
aSubFormatThe sub format of the overlay image. Currently is not supported, shoud set to KNullUid.
Leave Codes
KErrNotSupportedAlways. Current this function is not supported.

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

IMPORT_C voidSetInputL(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().

Parameters
aBufferThe pointer to the buffer of the overlay image.
aFormatThe format of the overlay image.
aSubFormatThe sub format of the overlay image. Currently is not supported, shoud set to KNullUid.
Leave Codes
KErrNotReady
KErrNotSupportedThe aSubFormat is not NULL.
OtherA range of system wide error codes.

SetInputL ( const CFbsBitmap &, const CFbsBitmap * )

IMPORT_C voidSetInputL(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().

Parameters
aBitmapThe pointer to the bitmap of the overlay image.
aMaskThe mask of the overlay image. Currently not supported, mush be NULL.
Leave Codes
KErrNotReady
KErrNotSupportedThe aMask is not NULL.
OtherA range of system wide error codes.

SetInputL ( const CImageFrame & )

IMPORT_C voidSetInputL(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().

Parameters
aPixelBufferThe CImageFrame type pointer of the overlay image.
Leave Codes
KErrNotReady
OtherA range of system wide error codes.

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

IMPORT_C voidSetL(const TSize &aSize,
const TPoint &aPosition =  TPoint(0, 0),
TReal32aAngle = 0
)

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

Parameters
aSizeThe size of the overlay image.
aPositionThe position of the overlay image geometric centre.
aAngleThe angle of the overlay image.
Leave Codes
KErrNotReady
KErrArgumentWidth or height of aSize is less than 0.
KErrArgumentaSize does not preserve aspect ratio and the plugin implementation supports scaling with aspect ratio preserved only.
OtherA range of system wide error codes.

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

IMPORT_C voidSetL(TReal32aScaleX = 1.0,
TReal32aScaleY = 1.0,
const TPoint &aPosition =  TPoint(0, 0),
TReal32aAngle = 0
)

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

Parameters
aScaleXThe scale of the overlay image width.
aScaleYThe scale of the overlay image height.
aPositionThe position of the overlay image geometric centre.
aAngleThe angle of the overlay image.
Leave Codes
KErrArgumentScale is less than 0 or equal to 0
KErrArgumentaScaleX and aScaleY are not equal and the plugin implementation supports scaling with aspect ratio preserved only.
KErrNotReady
OtherA range of system wide error codes.

SizeL ( )

IMPORT_C TSizeSizeL()const

Gets the size of the overlay image.

Return Value
The size of the overlay image.
Leave Codes
OtherA range of system wide error codes.

SupportedInputDisplayModesL ( RArray< TDisplayMode > & )

IMPORT_C voidSupportedInputDisplayModesL(RArray< TDisplayMode > &aDisplayModes)const

Gets the supported overlay image display modes.

Parameters
aDisplayModesThe supported display modes of overlay image of ImageProcessor.

SupportedInputFormatsL ( RArray< TUid > & )

IMPORT_C voidSupportedInputFormatsL(RArray< TUid > &aFormats)const

Gets the supported overlay image formats.

Parameters
aFormatsThe supported formats of ImageProcessor of the overlay image.

SupportedInputImageFrameFormatsL ( RArray< TUid > & )

IMPORT_C voidSupportedInputImageFrameFormatsL(RArray< TUid > &aFormats)const

Gets the supported overlay image frame formats.

Parameters
aFormatsThe supported formats of overlay image of ImageProcessor.

SupportedInputSubFormatsL ( TUid, RArray< TUid > & )

IMPORT_C voidSupportedInputSubFormatsL(TUidaFormat,
RArray< TUid > &aSubFormats
)const

Gets the supported overlay image sub formats.

Parameters
aFormatThe supported format of ImageProcessor of the overlay image.
aSubFormatsThe supported sub formats of ImageProcessor of the overlay image.