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 void AddFilterL (const TDesC &)
IMPORT_C void AddUndoRedoStepL ()
IMPORT_C TBool CanUndo ()
IMPORT_C void CreateExifThumbNailL ()
IMPORT_C void CreateIclSourceL (const TDesC &)
IMPORT_C void CreateJpegSourceL (const TDesC &)
IMPORT_C void CreateJpegTargetL (const TDesC &, const TInt , const TSize *)
IMPORT_C void CreateRGB888TargetL ()
IMPORT_C void GetOutputImageSize ( TInt &, TInt &)
IMPORT_C CSystemParameters * GetSystemPars ()
IMPORT_C TZoomMode GetZoomMode ()
IMPORT_C void InitUndoRedo ()
IMPORT_C TBool IsImageChanged ()
IMPORT_C CEngineWrapper * NewL ()
IMPORT_C void PanL (const TDirection )
IMPORT_C void PanL ( TInt , TInt )
IMPORT_C void RenderAbortL ()
IMPORT_C TInt RenderBlockL ()
IMPORT_C void RenderL ( TInt *)
IMPORT_C void RestoreZoomL ()
IMPORT_C void RotateL (const TRotation )
IMPORT_C void SetBitmap ( CFbsBitmap *)
IMPORT_C void SetJpegCommentL (const TDesC8 &)
IMPORT_C void SetParamsL (const TDesC &)
IMPORT_C void SetScreenSizeL (const TSize &)
IMPORT_C void StoreZoomL ()
IMPORT_C void UndoL ()
IMPORT_C void ZoomL (const TZoom )
Private Member Functions
CEngineWrapper ()
void AddRotateFilterL ()
void Cleanup ()
void ComputeBoundingRectL ()
TPoint ComputeNewPanValue (const TRect &)
TInt ComputeRotationL ()
void ComputeSystemParameters ()
TRect ComputeViewPort (const TInt )
TRect ComputeVisibleViewPort (const TRect &)
void ConstructL ()
void CopyBufferL ( TUint32 *)
TInt FileExists ( TDes &)
void GetCurrentDateTime ( TDes8 &)
TBool IsSameString (const TUint8 *, const TUint8 *)
void UpdateCropRectL ()
void UpdateExifTagsL ()
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
enum TRenderingMode { 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::TRenderingMode iMode
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 void AddFilterL ( const TDesC & aFilterName )

Adds new filter to the engine.

Since
S60 v5.0

Parameters

const TDesC & aFilterName filter plug-in name

AddRotateFilterL()

void AddRotateFilterL ( ) [private]

Adds rotation filter to the engine.

Since
S60 v5.0

AddUndoRedoStepL()

IMPORT_C void AddUndoRedoStepL ( )

Sets a new undo / redo step.

Since
S60 v5.0

CanUndo()

IMPORT_C TBool CanUndo ( )

Checks if it is possible to undo.

Since
S60 v5.0

Cleanup()

void Cleanup ( ) [private]

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

Since
S60 v5.0

ComputeBoundingRectL()

void ComputeBoundingRectL ( ) [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 & aVvpOld the old visible view port area

ComputeRotationL()

TInt ComputeRotationL ( ) [private]

Computes current total rotation of the original image in degrees.

Since
S60 v5.0

ComputeSystemParameters()

void ComputeSystemParameters ( ) [private]

Computes current system parameters.

Since
S60 v5.0

ComputeViewPort(const TInt)

TRect ComputeViewPort ( const TInt aStartInd = 2 ) [private]

No functionality.

Since
S60 v5.0

Parameters

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

ComputeVisibleViewPort(const TRect &)

TRect ComputeVisibleViewPort ( const TRect & aViewPort ) [private]

No functionality.

Since
S60 v5.0

Parameters

const TRect & aViewPort the current view port

ConstructL()

void ConstructL ( ) [private]

CopyBufferL(TUint32 *)

void CopyBufferL ( TUint32 * aBuffer ) [private]

Copies rendered buffer from engine to screen bitmap.

Since
S60 v5.0

Parameters

TUint32 * aBuffer pointer to engine buffer data

CreateExifThumbNailL()

IMPORT_C void CreateExifThumbNailL ( )

Creates new EXIF thumbnail from the current filter stack.

Since
S60 v5.0

CreateIclSourceL(const TDesC &)

IMPORT_C void CreateIclSourceL ( const TDesC & aFileName )

Creates ICL source to engine.

Since
S60 v5.0

Parameters

const TDesC & aFileName source image file name

CreateJpegSourceL(const TDesC &)

IMPORT_C void CreateJpegSourceL ( const TDesC & aFileName )

Creates JPEG source to engine.

Since
S60 v5.0

Parameters

const TDesC & aFileName source image file name

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

IMPORT_C void CreateJpegTargetL ( const TDesC & aFileName,
const TInt aQuality,
const TSize * aSize = NULL
)

Creates JPEG target for engine.

Since
S60 v5.0

Parameters

const TDesC & aFileName saved image file name
const TInt aQuality saved image quality
const TSize * aSize = NULL image size (width and height)

CreateRGB888TargetL()

IMPORT_C void CreateRGB888TargetL ( )

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 & aFileName file name, on return includes the correct path

GetCurrentDateTime(TDes8 &)

void GetCurrentDateTime ( TDes8 & aDateTimeBuf ) const [private]

Gets current date and time as descriptor.

Since
S60 v5.0

Parameters

TDes8 & aDateTimeBuf contains datetime on return

GetOutputImageSize(TInt &, TInt &)

IMPORT_C void GetOutputImageSize ( TInt & aWidth,
TInt & aHeight
) const

No functionality.

Since
S60 v5.0

Parameters

TInt & aWidth width of the output image in pixels
TInt & aHeight height of the output image in pixels

GetSystemPars()

IMPORT_C CSystemParameters * GetSystemPars ( )

Gets system parameters

Since
S60 v5.0

GetZoomMode()

IMPORT_C TZoomMode GetZoomMode ( )

GetZoomMode Returns current zoom mode.

Since
S60 v5.0

InitUndoRedo()

IMPORT_C void InitUndoRedo ( )

Initializes undo / redo stack.

Since
S60 v5.0

IsImageChanged()

IMPORT_C TBool IsImageChanged ( )

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 * aString1 first string to be compared
const TUint8 * aString2 second string to be compared

NewL()

IMPORT_C CEngineWrapper * NewL ( ) [static]

Two-phased constructor.

PanL(const TDirection)

IMPORT_C void PanL ( const TDirection aDir )

Pans the image.

Since
S60 v5.0

Parameters

const TDirection aDir direction, see commondefs.h

PanL(TInt, TInt)

IMPORT_C void PanL ( TInt aXChange,
TInt aYChange
)

Pans the image. Used when panning is done with touch

Since
S60 v5.0

Parameters

TInt aXChange x-directional change on the screen
TInt aYChange y-directional change on the screen

RenderAbortL()

IMPORT_C void RenderAbortL ( )

Aborts block rendering

Since
S60 v5.0

RenderBlockL()

IMPORT_C TInt RenderBlockL ( )

Renders a block

Since
S60 v5.0

RenderL(TInt *)

IMPORT_C void RenderL ( TInt * aMultiSessionBlockCount = NULL )

Renders the engine graph.

Since
S60 v5.0

Parameters

TInt * aMultiSessionBlockCount = NULL not used

RestoreZoomL()

IMPORT_C void RestoreZoomL ( )

Restores stored zoom value.

Since
S60 v5.0

RotateL(const TRotation)

IMPORT_C void RotateL ( const TRotation aRot )

Rotates the image.

Since
S60 v5.0

Parameters

const TRotation aRot rotation direction, see commodefs.h

SetBitmap(CFbsBitmap *)

IMPORT_C void SetBitmap ( CFbsBitmap * aBitmap )

Sets the bitmap to member variable.

Since
S60 v5.0

Parameters

CFbsBitmap * aBitmap bitmap to be set

SetJpegCommentL(const TDesC8 &)

IMPORT_C void SetJpegCommentL ( const TDesC8 & aComment )

No functionality.

Since
S60 v5.0

Parameters

const TDesC8 & aComment comment to be set

SetParamsL(const TDesC &)

IMPORT_C void SetParamsL ( const TDesC & aParam )

Sets filter parameters for the last (top) filter.

Since
S60 v5.0

Parameters

const TDesC & aParam reference to parameter structure

SetScreenSizeL(const TSize &)

IMPORT_C void SetScreenSizeL ( const TSize & aSize )

Sets screen size to engine.

Since
S60 v5.0

Parameters

const TSize & aSize screen size

StoreZoomL()

IMPORT_C void StoreZoomL ( )

Stores current zoom value.

Since
S60 v5.0

UndoL()

IMPORT_C void UndoL ( )

Undoes the last operation.

Since
S60 v5.0

UpdateCropRectL()

void UpdateCropRectL ( ) [private]

Updates scale and pan to crop rectangle.

Since
S60 v5.0

UpdateExifTagsL()

void UpdateExifTagsL ( ) [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 void ZoomL ( const TZoom aZoom )

ZoomL Zooms the image.

Since
S60 v5.0

Parameters

const TZoom aZoom zoom 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::TRenderingMode iMode [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