CSvgImageElementImpl::CSvgImageLoaderUtil Class Reference

class CSvgImageElementImpl::CSvgImageLoaderUtil : public CActive

Helper class to load images asynchronously. To load an image: 1. Instantiate CSvgImageLoaderUtil with NewL/NewLC, passing a MSVGImageLoadingObserver, which implements the 'ImageLoadingCompleted' method, and a file name. This method is called by the CSvgImageLoaderUtil object when loading is complete. The error code passed-in will indicate a successful load or not. 2. Set the output mode with 'SetDisplayMode' the default is EColor64K, see TDisplayMode for more options. 3. Call one of the 'RequestForImageL' method.

SVGEngine.lib
Since
1.0

Inherits from

Constructor & Destructor Documentation

CSvgImageLoaderUtil()

CSvgImageLoaderUtil()[private]

Constructor

Since
1.0

~CSvgImageLoaderUtil()

~CSvgImageLoaderUtil()

Destructor

Since
1.0

Member Functions Documentation

ConstructL(MSVGImageLoadingObserver *, RFile &, TBool)

voidConstructL(MSVGImageLoadingObserver *aObserver,
RFile &aFileHandle,
TBoolaSyncLoading
)[private]

Construct this object with leavable calls.

Since
1.0

Parameters

MSVGImageLoadingObserver * aObserver: callback object when image loading completes.
RFile & aFileHandle: file handle of image to load.
TBool aSyncLoading: Perform Synchronous loading(ETrue) or not

ConstructL(MSVGImageLoadingObserver *, const TDesC8 &, TBool)

voidConstructL(MSVGImageLoadingObserver *aObserver,
const TDesC8 &aEncodedData,
TBoolaSyncLoading
)[private]

Phase two of construction.

Since
1.0

Parameters

MSVGImageLoadingObserver * aObserver: callback object when image loading completes.
const TDesC8 & aEncodedData: encode 8-bit data buffer
TBool aSyncLoading: Perform Synchronous loading(ETrue) or not

DoCancel()

voidDoCancel()[virtual]

From CActive Handles cancelling of asynchronous requests

Since
2.0

GetFrameInfo()

TFrameInfo GetFrameInfo()
Returns the FrameInfo of Image. Function is called once the Decoder is created.
Since
3.2

IsSynchronousLoading()

TBool IsSynchronousLoading()
Return wether image decoding is synchronous or asynchronous.
Since
3.1

NewL(MSVGImageLoadingObserver *, RFile &, TBool)

CSvgImageLoaderUtil *NewL(MSVGImageLoadingObserver *aObserver,
RFile &aFileHandle,
TBoolaSyncLoading
)[static]

Constructor

Since
1.0

Parameters

MSVGImageLoadingObserver * aObserver: callback object when image loading completes.
RFile & aFileHandle: file handle of image to load.
TBool aSyncLoading: Perform Synchronous loading(ETrue) or not

NewL(MSVGImageLoadingObserver *, const TDesC8 &, TBool)

CSvgImageLoaderUtil *NewL(MSVGImageLoadingObserver *aObserver,
const TDesC8 &aEncodedData,
TBoolaSyncLoading
)[static]

Constructor

Since
1.0

Parameters

MSVGImageLoadingObserver * aObserver: callback object when image loading completes.
const TDesC8 & aEncodedData: encode 8-bit data buffer
TBool aSyncLoading: Perform Synchronous loading(ETrue) or not

RequestForImageL(CFbsBitmap &, CFbsBitmap &, TBool, TFrameInfo)

voidRequestForImageL(CFbsBitmap &aBitmap,
CFbsBitmap &aMask,
TBoolaHasAlpha,
TFrameInfoaFrameInfo
)

Request for the image and size the bitmap to the size of the image.

Since
1.0

Parameters

CFbsBitmap & aBitmap: bitmap to store the pixels
CFbsBitmap & aMask: bitmap to store the Mask pixels
TBool aHasAlpha: Alpha value indicator, Used to create Mask
TFrameInfo aFrameInfo: TFrameInfo structure

RunError(TInt)

TInt RunError(TIntaError)[virtual]

From CActive Called when asynchronous request is completed

Since
2.0

Parameters

TInt aError: error code

RunL()

voidRunL()[virtual]

From CActive Called when asynchronous request is completed

Since
2.0

SetDisplayMode(TDisplayMode)

voidSetDisplayMode(TDisplayModeaDisplayMode)

Set the output mode, the default value is EColor64K.

Since
1.0

Parameters

TDisplayMode aDisplayMode: output mode.

Member Data Documentation

CActiveSchedulerWait * iActiveSchedulerWait

CActiveSchedulerWait *iActiveSchedulerWait[private]

TDisplayMode iDisplayMode

TDisplayMode iDisplayMode[private]

HBufC8 * iImageByteData

HBufC8 *iImageByteData[private]

CImageDecoder * iImageDecoder

CImageDecoder *iImageDecoder[private]

TBool iIsSyncLoading

TBool iIsSyncLoading[private]

MSVGImageLoadingObserver * iObserver

MSVGImageLoadingObserver *iObserver[private]