CEngineWrapper Class Reference

class CEngineWrapper : public CBase

CEngineWrapper wraps functionality of Gonzales image processing engine architecture.

   ?good_class_usage_example(s)
EngineWrapper.lib
Since
S60 v5.0

Inherits from

Public Member Functions
~CEngineWrapper()
IMPORT_C voidAddFilterL(const TDesC &)
IMPORT_C voidAddUndoRedoStepL()
IMPORT_C TBoolCanUndo()
IMPORT_C voidCreateExifThumbNailL()
IMPORT_C voidCreateIclSourceL(const TDesC &)
IMPORT_C voidCreateJpegSourceL(const TDesC &)
IMPORT_C voidCreateJpegTargetL(const TDesC &, const TInt, const TSize *)
IMPORT_C voidCreateRGB888TargetL()
IMPORT_C voidGetOutputImageSize(TInt &, TInt &)
IMPORT_C CSystemParameters *GetSystemPars()
IMPORT_C TZoomModeGetZoomMode()
IMPORT_C voidInitUndoRedo()
IMPORT_C TBoolIsImageChanged()
IMPORT_C CEngineWrapper *NewL()
IMPORT_C voidPanL(const TDirection)
IMPORT_C voidPanL(TInt, TInt)
IMPORT_C voidRenderAbortL()
IMPORT_C TIntRenderBlockL()
IMPORT_C voidRenderL(TInt *)
IMPORT_C voidRestoreZoomL()
IMPORT_C voidRotateL(const TRotation)
IMPORT_C voidSetBitmap(CFbsBitmap *)
IMPORT_C voidSetJpegCommentL(const TDesC8 &)
IMPORT_C voidSetParamsL(const TDesC &)
IMPORT_C voidSetScreenSizeL(const TSize &)
IMPORT_C voidStoreZoomL()
IMPORT_C voidUndoL()
IMPORT_C voidZoomL(const TZoom)
Private Member Functions
CEngineWrapper()
voidAddRotateFilterL()
voidCleanup()
voidComputeBoundingRectL()
TPoint ComputeNewPanValue(const TRect &)
TInt ComputeRotationL()
voidComputeSystemParameters()
TRect ComputeViewPort(const TInt)
TRect ComputeVisibleViewPort(const TRect &)
voidConstructL()
voidCopyBufferL(TUint32 *)
TInt FileExists(TDes &)
voidGetCurrentDateTime(TDes8 &)
TBool IsSameString(const TUint8 *, const TUint8 *)
voidUpdateCropRectL()
voidUpdateExifTagsL()
TPtrC8 UpdateExifThumbnailL()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enumTRenderingMode { ERenderingModeMin = 0, ERenderingModeJpeg, ERenderingModeRGB888, ERenderingModeMax }
Private Attributes
TRect iBoundingRect
TInt iChangeCount
TBuf< 256 >iCmd
CExifParser *iExifParser
HBufC8 *iJpegComment
CFilterStack *iMainEngine
TReal iMaxScale
TReal iMinScale
enum CEngineWrapper::TRenderingModeiMode
TRect iOldCropRect
TReal iPanStep
TReal iPanX
TReal iPanXSt
TReal iPanY
TReal iPanYSt
TInt iPrevChangeCount
TBool iRenderScaleBuffer
TReal iScale
TReal iScaleSt
RArray< TReal >iScaleUndoBuf
CFbsBitmap *iScreenBitmap
TSize iScreenSize
TSize iSourceSize
CSystemParameters *iSysPars
TFileName iTargetFile
TUint32 *iThumb
TSize iThumbSize
RArray< TInt >iUndoPoints
TZoomMode iZoomMode

Constructor & Destructor Documentation

CEngineWrapper()

CEngineWrapper()[private]

~CEngineWrapper()

IMPORT_C~CEngineWrapper()

Destructor.

Member Functions Documentation

AddFilterL(const TDesC &)

IMPORT_C voidAddFilterL(const TDesC &aFilterName)

Adds new filter to the engine.

Since
S60 v5.0

Parameters

const TDesC & aFilterNamefilter plug-in name

AddRotateFilterL()

voidAddRotateFilterL()[private]

Adds rotation filter to the engine.

Since
S60 v5.0

AddUndoRedoStepL()

IMPORT_C voidAddUndoRedoStepL()

Sets a new undo / redo step.

Since
S60 v5.0

CanUndo()

IMPORT_C TBoolCanUndo()

Checks if it is possible to undo.

Since
S60 v5.0

Cleanup()

voidCleanup()[private]

Cleans up the engine, frees allocated memory. Does not delete the engine itself.

Since
S60 v5.0

ComputeBoundingRectL()

voidComputeBoundingRectL()[private]

Computes bounding rectangle used from global cropping.

Since
S60 v5.0

ComputeNewPanValue(const TRect &)

TPoint ComputeNewPanValue(const TRect &aVvpOld)[private]

No functionality

Since
S60 v5.0

Parameters

const TRect & aVvpOldthe old visible view port area

ComputeRotationL()

TInt ComputeRotationL()[private]

Computes current total rotation of the original image in degrees.

Since
S60 v5.0

ComputeSystemParameters()

voidComputeSystemParameters()[private]

Computes current system parameters.

Since
S60 v5.0

ComputeViewPort(const TInt)

TRect ComputeViewPort(const TIntaStartInd = 2)[private]

No functionality.

Since
S60 v5.0

Parameters

const TInt aStartInd = 2view port start index, defaults to 2

ComputeVisibleViewPort(const TRect &)

TRect ComputeVisibleViewPort(const TRect &aViewPort)[private]

No functionality.

Since
S60 v5.0

Parameters

const TRect & aViewPortthe current view port

ConstructL()

voidConstructL()[private]

CopyBufferL(TUint32 *)

voidCopyBufferL(TUint32 *aBuffer)[private]

Copies rendered buffer from engine to screen bitmap.

Since
S60 v5.0

Parameters

TUint32 * aBufferpointer to engine buffer data

CreateExifThumbNailL()

IMPORT_C voidCreateExifThumbNailL()

Creates new EXIF thumbnail from the current filter stack.

Since
S60 v5.0

CreateIclSourceL(const TDesC &)

IMPORT_C voidCreateIclSourceL(const TDesC &aFileName)

Creates ICL source to engine.

Since
S60 v5.0

Parameters

const TDesC & aFileNamesource image file name

CreateJpegSourceL(const TDesC &)

IMPORT_C voidCreateJpegSourceL(const TDesC &aFileName)

Creates JPEG source to engine.

Since
S60 v5.0

Parameters

const TDesC & aFileNamesource image file name

CreateJpegTargetL(const TDesC &, const TInt, const TSize *)

IMPORT_C voidCreateJpegTargetL(const TDesC &aFileName,
const TIntaQuality,
const TSize *aSize = NULL
)

Creates JPEG target for engine.

Since
S60 v5.0

Parameters

const TDesC & aFileNamesaved image file name
const TInt aQualitysaved image quality
const TSize * aSize = NULLimage size (width and height)

CreateRGB888TargetL()

IMPORT_C voidCreateRGB888TargetL()

Creates RGB888 buffer target to engine.

Since
S60 v5.0

FileExists(TDes &)

TInt FileExists(TDes &aFileName)const [private]

Checks if a file exists or not, on return has the correct path to the checked file.

Since
S60 v5.0

Parameters

TDes & aFileNamefile name, on return includes the correct path

GetCurrentDateTime(TDes8 &)

voidGetCurrentDateTime(TDes8 &aDateTimeBuf)const [private]

Gets current date and time as descriptor.

Since
S60 v5.0

Parameters

TDes8 & aDateTimeBufcontains datetime on return

GetOutputImageSize(TInt &, TInt &)

IMPORT_C voidGetOutputImageSize(TInt &aWidth,
TInt &aHeight
)const

No functionality.

Since
S60 v5.0

Parameters

TInt & aWidthwidth of the output image in pixels
TInt & aHeightheight of the output image in pixels

GetSystemPars()

IMPORT_C CSystemParameters *GetSystemPars()

Gets system parameters

Since
S60 v5.0

GetZoomMode()

IMPORT_C TZoomModeGetZoomMode()

GetZoomMode Returns current zoom mode.

Since
S60 v5.0

InitUndoRedo()

IMPORT_C voidInitUndoRedo()

Initializes undo / redo stack.

Since
S60 v5.0

IsImageChanged()

IMPORT_C TBoolIsImageChanged()

Checks if the image is changed after last saving.

Since
S60 v5.0

IsSameString(const TUint8 *, const TUint8 *)

TBool IsSameString(const TUint8 *aString1,
const TUint8 *aString2
)[private]

Checks if two strings are equal.

Since
S60 v5.0

Parameters

const TUint8 * aString1first string to be compared
const TUint8 * aString2second string to be compared

NewL()

IMPORT_C CEngineWrapper *NewL()[static]

Two-phased constructor.

PanL(const TDirection)

IMPORT_C voidPanL(const TDirectionaDir)

Pans the image.

Since
S60 v5.0

Parameters

const TDirection aDirdirection, see commondefs.h

PanL(TInt, TInt)

IMPORT_C voidPanL(TIntaXChange,
TIntaYChange
)

Pans the image. Used when panning is done with touch

Since
S60 v5.0

Parameters

TInt aXChangex-directional change on the screen
TInt aYChangey-directional change on the screen

RenderAbortL()

IMPORT_C voidRenderAbortL()

Aborts block rendering

Since
S60 v5.0

RenderBlockL()

IMPORT_C TIntRenderBlockL()

Renders a block

Since
S60 v5.0

RenderL(TInt *)

IMPORT_C voidRenderL(TInt *aMultiSessionBlockCount = NULL)

Renders the engine graph.

Since
S60 v5.0

Parameters

TInt * aMultiSessionBlockCount = NULLnot used

RestoreZoomL()

IMPORT_C voidRestoreZoomL()

Restores stored zoom value.

Since
S60 v5.0

RotateL(const TRotation)

IMPORT_C voidRotateL(const TRotationaRot)

Rotates the image.

Since
S60 v5.0

Parameters

const TRotation aRotrotation direction, see commodefs.h

SetBitmap(CFbsBitmap *)

IMPORT_C voidSetBitmap(CFbsBitmap *aBitmap)

Sets the bitmap to member variable.

Since
S60 v5.0

Parameters

CFbsBitmap * aBitmapbitmap to be set

SetJpegCommentL(const TDesC8 &)

IMPORT_C voidSetJpegCommentL(const TDesC8 &aComment)

No functionality.

Since
S60 v5.0

Parameters

const TDesC8 & aCommentcomment to be set

SetParamsL(const TDesC &)

IMPORT_C voidSetParamsL(const TDesC &aParam)

Sets filter parameters for the last (top) filter.

Since
S60 v5.0

Parameters

const TDesC & aParamreference to parameter structure

SetScreenSizeL(const TSize &)

IMPORT_C voidSetScreenSizeL(const TSize &aSize)

Sets screen size to engine.

Since
S60 v5.0

Parameters

const TSize & aSizescreen size

StoreZoomL()

IMPORT_C voidStoreZoomL()

Stores current zoom value.

Since
S60 v5.0

UndoL()

IMPORT_C voidUndoL()

Undoes the last operation.

Since
S60 v5.0

UpdateCropRectL()

voidUpdateCropRectL()[private]

Updates scale and pan to crop rectangle.

Since
S60 v5.0

UpdateExifTagsL()

voidUpdateExifTagsL()[private]

Handles tags that are always updated to the new image. If tags do not exist, creates new ones.

Since
S60 v5.0

UpdateExifThumbnailL()

TPtrC8 UpdateExifThumbnailL()[private]

Updates thumbnail data to EXIF parser.

Since
S60 v5.0

ZoomL(const TZoom)

IMPORT_C voidZoomL(const TZoomaZoom)

ZoomL Zooms the image.

Since
S60 v5.0

Parameters

const TZoom aZoomzoom direction

Member Enumerations Documentation

Enum TRenderingMode

Rendering mode

Enumerators

ERenderingModeMin = 0
ERenderingModeJpeg
ERenderingModeRGB888
ERenderingModeMax

Member Data Documentation

TRect iBoundingRect

TRect iBoundingRect[private]

TInt iChangeCount

TInt iChangeCount[private]

Change counter, 0 if no changes after save

TBuf< 256 > iCmd

TBuf< 256 >iCmd[private]

Engine command line

CExifParser * iExifParser

CExifParser *iExifParser[private]

EXIF parser

HBufC8 * iJpegComment

HBufC8 *iJpegComment[private]

JPEG comment text

CFilterStack * iMainEngine

CFilterStack *iMainEngine[private]

Main engine

TReal iMaxScale

TReal iMaxScale[private]

TReal iMinScale

TReal iMinScale[private]

enum CEngineWrapper::TRenderingMode iMode

enum CEngineWrapper::TRenderingModeiMode[private]

Rendering mode

TRect iOldCropRect

TRect iOldCropRect[private]

TReal iPanStep

TReal iPanStep[private]

TReal iPanX

TReal iPanX[private]

TReal iPanXSt

TReal iPanXSt[private]

TReal iPanY

TReal iPanY[private]

TReal iPanYSt

TReal iPanYSt[private]

TInt iPrevChangeCount

TInt iPrevChangeCount[private]

Previous change counter

TBool iRenderScaleBuffer

TBool iRenderScaleBuffer[private]

Scale buffer changed

TReal iScale

TReal iScale[private]

Crop parameters

TReal iScaleSt

TReal iScaleSt[private]

Stored crop parameters

RArray< TReal > iScaleUndoBuf

RArray< TReal >iScaleUndoBuf[private]

Undo buffer for scale parameter

CFbsBitmap * iScreenBitmap

CFbsBitmap *iScreenBitmap[private]

Screen data address

TSize iScreenSize

TSize iScreenSize[private]

Screen size

TSize iSourceSize

TSize iSourceSize[private]

Source image size

CSystemParameters * iSysPars

CSystemParameters *iSysPars[private]

System parameters

TFileName iTargetFile

TFileName iTargetFile[private]

Target image name

TUint32 * iThumb

TUint32 *iThumb[private]

EXIF thumbnail buffer

TSize iThumbSize

TSize iThumbSize[private]

EXIF thumbnail dimensions

RArray< TInt > iUndoPoints

RArray< TInt >iUndoPoints[private]

Undo points

TZoomMode iZoomMode

TZoomMode iZoomMode[private]

Current zooming mode