class CSvgEngineImpl : public CBase |
Class description goes here.
Private Member Functions | |
---|---|
CSvgEngineImpl() | |
CSvgEngineImpl(CFbsBitmap *, MSvgRequestObserver *) | |
void | ConstructL(TFontSpec &, CSvgBitmapFontProvider *) |
void | ConstructL(TFontSpec &, CSvgBitmapFontProvider *, SVGRendererId) |
void | CopyBuffer(TUint32 *, TUint32 *, const TSize) |
CFbsBitmap * | CreateOpacityFrameBufferL() |
void | DoHyperLinkingL() |
void | FilteredBlitRGB565() |
void | FilteredBlitXRGB4444() |
void | FindEditableElements(CSvgElementImpl *, RPointerArray< CSvgElementImpl > &) |
void | InitializeEventReceiverListL(CSvgElementImpl *) |
TBool | IsAnimationElement(CSvgElementImpl *) |
TBool | IsEndedWithCompleteTextTag(TDes &, TInt) |
CSvgEngineImpl | ( | CFbsBitmap * | aFrameBuffer, |
MSvgRequestObserver * | aReqObserver | ||
) | [private] |
Private constructor
CFbsBitmap * aFrameBuffer | - Pointer to a buffer where the SVG document raster is drawn |
MSvgRequestObserver * aReqObserver | - Pointer to a client side object that implements the MSvgRequestObserver interface |
void | AddAnimationListener | ( | MSvgAnimationListener * | aListener | ) |
Add a hyperlink listener.
MSvgAnimationListener * aListener |
void | AddHyperlinkListener | ( | MSvgHyperlinkListener * | aListener | ) |
Add a hyperlink listener.
MSvgHyperlinkListener * aListener |
void | AddInteractiveElementListener | ( | MSvgInteractiveElementListener * | aListener | ) |
MSvgInteractiveElementListener * aListener |
void | AddMouseListener | ( | const MSvgMouseListener * | aListener | ) |
Add a MSvgMouseListener to this SvgEngine
const MSvgMouseListener * aListener |
void | AddTextAreaListener | ( | MSvgTextAreaListener * | aListener | ) |
Add a textbox listener.
MSvgTextAreaListener * aListener |
void | AddTextListener | ( | MSvgTextListener * | aListener | ) |
MSvgTextListener * aListener |
void | AddViewPortListener | ( | MSvgViewPortListener * | aListener | ) |
MSvgViewPortListener * aListener |
void | ChangeDuration | ( | TUint32 | aTimerDuration | ) |
Given a document handle and a url this call attaches the given data (ldata) to every element that references that url
TUint32 aTimerDuration |
void | CheckForHyperlinkMouseover | ( | TInt | aX, |
TInt | aY | |||
) |
Process the given coordinate to determine if it is inside/outside a hyperlink; then, notify the hyperlink listeners.
void | ConstructL | ( | CSvgBitmapFontProvider * | aSvgBitmapFontProvider | ) |
CSvgBitmapFontProvider * aSvgBitmapFontProvider |
void | ConstructL | ( | TFontSpec & | aFontSpec, |
CSvgBitmapFontProvider * | aSvgBitmapFontProvider | |||
) | [private] |
A private constructor that constructs heap objects
TFontSpec & aFontSpec | |
CSvgBitmapFontProvider * aSvgBitmapFontProvider |
void | ConstructL | ( | TFontSpec & | aFontSpec, |
CSvgBitmapFontProvider * | aSvgBitmapFontProvider, | |||
SVGRendererId | aRendererType | |||
) | [private] |
TFontSpec & aFontSpec | |
CSvgBitmapFontProvider * aSvgBitmapFontProvider | |
SVGRendererId aRendererType |
void | CopyBuffer | ( | TUint32 * | aSrc, |
TUint32 * | aDest, | |||
const TSize | aSize | |||
) | [private] |
void | CustomOption | ( | TBool | aCustomOption | ) |
A private method that switch between OpenVG and VGR implementation
TBool aCustomOption |
void | DoHyperLinkingL | ( | ) | [private] |
Initiate the process of opening embedded links in the SVG source
CSvgDocumentImpl * | Document | ( | ) |
An acessor to the document object that represents the current SVG source
void | DrawElementsL | ( | CSvgElementImpl * | aRootElement | ) |
Kick off the process of rasterizing the SVG document elements
CSvgElementImpl * aRootElement | - Root element of the SVG document |
TUint32 | Duration | ( | CSvgDocumentImpl * | aDocumentElement = NULL | ) |
Return the animation duration for the given document, if NULL (default) then use the document attached to engine. The value 0xFFFFFFFF is return is the animation is indefinite.
CSvgDocumentImpl * aDocumentElement = NULL | - document to find animation duration. |
HBufC8 * | FetchExternalDataL | ( | const TDesC & | aUri | ) |
Return the data pointed to by the given URI string, from an external source. Calling client takes ownership of returned HBufC8 pointer.
const TDesC & aUri |
TBool | FetchFont | ( | const TDesC & | aUri, |
RFs & | aSession, | |||
RFile & | aFileHandle | |||
) |
Obtain a font source embedded within an SVG source
TBool | FetchImage | ( | const TDesC & | aUri, |
RFs & | aSession, | |||
RFile & | aFileHandle | |||
) |
Obtain an image source embedded within a SVG source (JPEG, PNG)
void | FilteredBlitRGB565 | ( | ) | const [private] |
A complex method that does color calculations for anti aliasing
void | FilteredBlitXRGB4444 | ( | ) | const [private] |
A complex method that does color calculations for anti aliasing
void | FindAllNonViewableElements | ( | CSvgElementImpl * | aStartElement, |
RPointerArray< CSvgElementImpl > & | iElementList | |||
) |
Find all elements in the subtree for non-viewable elements, including the given starting node element. Viewable element are abstract elements that are not drawn, such as <g>, <animate>, <animateMotion>, etc.
CSvgElementImpl * aStartElement | |
RPointerArray< CSvgElementImpl > & iElementList |
void | FindAllViewableElements | ( | CSvgElementImpl * | aStartElement, |
RPointerArray< CSvgElementImpl > & | iElementList | |||
) |
Find all elements in the subtree for "viewable" elements, including the given starting node element. Viewable element are concrete elements that are drawn, such as <rect>, <circle>, <path>, etc. This function only checks for containing of the elements' bounding-boxes.
CSvgElementImpl * aStartElement | |
RPointerArray< CSvgElementImpl > & iElementList |
void | FindBBoxesForRotatedText | ( | const TDesC & | aString, |
RPointerArray< MRect > & | aBoundingBoxes, | |||
RArray< TPtrC > & | aTexts, | |||
RArray< TInt > & | aElementIds, | |||
TBool | aCaseSensitive | |||
) |
Get all the bounding-boxes for the given text and the contexts include the text was found. The bounding-boxes are transformed, taking zooming/panning in account.
void | FindEditableElements | ( | CSvgElementImpl * | aStartElement, |
RPointerArray< CSvgElementImpl > & | aList | |||
) | [private] |
CSvgElementImpl * aStartElement | |
RPointerArray< CSvgElementImpl > & aList |
void | GenerateMask | ( | CFbsBitmap * | aMask | ) |
Generate mask bitmap from alpha channel of the framebuffer
CFbsBitmap * aMask |
void | GetViewPort | ( | TInt | getWidth, |
TInt | getHeight, | |||
TBool | isWidthInPer, | |||
TBool | isHeightInPer, | |||
TInt & | setWidth, | |||
TInt & | setHeight | |||
) |
void | GetViewableElementsAtPoint | ( | CSvgDocumentImpl * | aSvgDocument, |
RPointerArray< CSvgElementImpl > & | aElements, | |||
TInt | aX, | |||
TInt | aY | |||
) |
Return the (first) viewable element at the given point. visible svg element.
CSvgDocumentImpl * aSvgDocument | |
RPointerArray< CSvgElementImpl > & aElements | |
TInt aX | |
TInt aY |
void | InitializeEngineL | ( | ) |
Initializes the SVG Engine primarily with width and height informtion This is based on the attribute specifications for the root 'svg' element
void | InitializeEventReceiverListL | ( | CSvgElementImpl * | aElement | ) | [private] |
CSvgElementImpl * aElement |
TBool | IsAnimationElement | ( | CSvgElementImpl * | aElement | ) | [private] |
FInd out whether a given element is animation type
CSvgElementImpl * aElement | - A pointer to an element |
TBool | IsEndedWithCompleteTextTag | ( | TDes & | bufferptr, |
TInt | EndOffset | |||
) | [private] |
void | LinkRequest | ( | const TDesC & | aUri | ) |
Set the URI information in the Engine
const TDesC & aUri |
void | LinkRequestWithShow | ( | const TDesC & | aUri, |
const TDesC & | aLinkShow | |||
) |
Need method description
CSvgEngineImpl * | NewL | ( | CSvgBitmapFontProvider * | aSvgBitmapFontProvider | ) | [static] |
CSvgBitmapFontProvider * aSvgBitmapFontProvider |
CSvgEngineImpl * | NewL | ( | CFbsBitmap * | aFrameBuffer, |
MSvgRequestObserver * | aReqObserver, | |||
TFontSpec & | aFontSpec, | |||
CSvgBitmapFontProvider * | aSvgBitmapFontProvider | |||
) | [static] |
Two phase constructor
CFbsBitmap * aFrameBuffer | - Pointer to a buffer where the SVG document raster is drawn |
MSvgRequestObserver * aReqObserver | - Pointer to a client side object that implements the MSvgRequestObserver interface |
TFontSpec & aFontSpec | |
CSvgBitmapFontProvider * aSvgBitmapFontProvider |
CSvgEngineImpl * | NewL | ( | CFbsBitmap * | aFrameBuffer, |
MSvgRequestObserver * | aReqObserver, | |||
TFontSpec & | aFontSpec, | |||
CSvgBitmapFontProvider * | aSvgBitmapFontProvider, | |||
SVGRendererId | aRendererType | |||
) | [static] |
CFbsBitmap * aFrameBuffer | |
MSvgRequestObserver * aReqObserver | |
TFontSpec & aFontSpec | |
CSvgBitmapFontProvider * aSvgBitmapFontProvider | |
SVGRendererId aRendererType |
CSvgEngineImpl * | NewLC | ( | CSvgBitmapFontProvider * | aSvgBitmapFontProvider | ) | [static] |
CSvgBitmapFontProvider * aSvgBitmapFontProvider |
CSvgEngineImpl * | NewLC | ( | CFbsBitmap * | aFrameBuffer, |
MSvgRequestObserver * | aReqObserver, | |||
TFontSpec & | aFontSpec, | |||
CSvgBitmapFontProvider * | aSvgBitmapFontProvider | |||
) | [static] |
Two phase constructor
CFbsBitmap * aFrameBuffer | - Pointer to a buffer where the SVG document raster is drawn |
MSvgRequestObserver * aReqObserver | - Pointer to a client side object that implements the MSvgRequestObserver interface |
TFontSpec & aFontSpec | |
CSvgBitmapFontProvider * aSvgBitmapFontProvider |
CSvgEngineImpl * | NewLC | ( | CFbsBitmap * | aFrameBuffer, |
MSvgRequestObserver * | aReqObserver, | |||
TFontSpec & | aFontSpec, | |||
CSvgBitmapFontProvider * | aSvgBitmapFontProvider, | |||
SVGRendererId | aRendererType | |||
) | [static] |
CFbsBitmap * aFrameBuffer | |
MSvgRequestObserver * aReqObserver | |
TFontSpec & aFontSpec | |
CSvgBitmapFontProvider * aSvgBitmapFontProvider | |
SVGRendererId aRendererType |
void | NotifyElementActivatedLinkEntered | ( | CSvgElementImpl * | aElement | ) |
CSvgElementImpl * aElement |
void | NotifyElementActivatedLinkExited | ( | CSvgElementImpl * | aElement | ) |
CSvgElementImpl * aElement |
void | NotifyHyperlinkActivated | ( | CSvgAElementImpl * | aAElementHandle | ) |
CSvgAElementImpl * aAElementHandle |
void | NotifyHyperlinkActivated | ( | const TDesC & | aUri | ) |
const TDesC & aUri |
void | NotifyHyperlinkActivatedWithShow | ( | const TDesC & | aUri, |
const TDesC & | aShow | |||
) |
void | NotifyHyperlinkEntered | ( | CSvgAElementImpl * | aAElementHandle | ) |
CSvgAElementImpl * aAElementHandle |
void | NotifyHyperlinkEntered | ( | const TDesC & | aUri | ) |
const TDesC & aUri |
void | NotifyHyperlinkExited | ( | CSvgAElementImpl * | aAElementHandle | ) |
CSvgAElementImpl * aAElementHandle |
void | NotifyHyperlinkExited | ( | const TDesC & | aUri | ) |
const TDesC & aUri |
void | NotifyInteractiveElementEntered | ( | CSvgElementImpl * | aElement | ) |
CSvgElementImpl * aElement |
void | NotifyInteractiveElementExited | ( | CSvgElementImpl * | aElement | ) |
CSvgElementImpl * aElement |
void | NotifyMouseEntered | ( | RPointerArray< CSvgElementImpl > & | aElements, |
TInt | aX, | |||
TInt | aY | |||
) |
Send to mouse listeners of a mouse-entered event.
RPointerArray< CSvgElementImpl > & aElements | |
TInt aX | |
TInt aY |
void | NotifyMouseExited | ( | RPointerArray< CSvgElementImpl > & | aElements, |
TInt | aX, | |||
TInt | aY | |||
) |
Send to mouse listeners of a mouse-exited event.
RPointerArray< CSvgElementImpl > & aElements | |
TInt aX | |
TInt aY |
void | NotifyMouseMoved | ( | RPointerArray< CSvgElementImpl > & | aElements, |
TInt | aX, | |||
TInt | aY | |||
) |
Send to mouse listeners of a mouse-moved event.
RPointerArray< CSvgElementImpl > & aElements | |
TInt aX | |
TInt aY |
void | NotifyMousePressed | ( | RPointerArray< CSvgElementImpl > & | aElements, |
TInt | aX, | |||
TInt | aY | |||
) |
Send to mouse listeners of a mouse-pressed event.
RPointerArray< CSvgElementImpl > & aElements | |
TInt aX | |
TInt aY |
void | NotifyMouseReleased | ( | RPointerArray< CSvgElementImpl > & | aElements, |
TInt | aX, | |||
TInt | aY | |||
) |
Send to mouse listeners of a mouse-released event.
RPointerArray< CSvgElementImpl > & aElements | |
TInt aX | |
TInt aY |
void | NotifyTextActivated | ( | CSvgTextElementImpl * | aTextElement | ) |
CSvgTextElementImpl * aTextElement |
void | NotifyTextAreaActivated | ( | CSvgTextAreaElementImpl * | aTextArea | ) |
CSvgTextAreaElementImpl * aTextArea |
void | NotifyTextAreaEntered | ( | CSvgTextAreaElementImpl * | aTextAreaElement | ) |
CSvgTextAreaElementImpl * aTextAreaElement |
void | NotifyTextAreaExited | ( | CSvgTextAreaElementImpl * | aTextAreaElement | ) |
CSvgTextAreaElementImpl * aTextAreaElement |
void | NotifyTextEntered | ( | CSvgTextElementImpl * | aTextElement | ) |
CSvgTextElementImpl * aTextElement |
void | NotifyTextExited | ( | CSvgTextElementImpl * | aTextElement | ) |
CSvgTextElementImpl * aTextElement |
TBool | PassesThumbNailRestriction | ( | ) |
Returns false only when document was loaded/prepared with in thumbnail mode and the frame buffer is larger than 80x80 Probably move 80x80 size to .mmp file (compiler option)
void | ProcessEventL | ( | CSvgDocumentImpl * | aSvgDocument, |
MSvgEvent * | aEvent, | |||
TBool | aRedraw = ETrue | |||
) |
Process various events received by the client for the SVG image
CSvgDocumentImpl * aSvgDocument | Pointer to the SVG Document on which event is to be processed. |
MSvgEvent * aEvent | - Pointer to the object that contains SVG event information (implements MSvgEvent interface) |
TBool aRedraw = ETrue |
void | RedrawL | ( | ) |
Invalidate the current raster and hence kick off another round of rasterization process
void | RemoveAnimationListener | ( | MSvgAnimationListener * | aListener | ) |
Add a hyperlink listener.
MSvgAnimationListener * aListener |
void | RemoveHyperlinkListener | ( | MSvgHyperlinkListener * | aListener | ) |
Add a hyperlink listener.
MSvgHyperlinkListener * aListener |
void | RemoveInteractiveElementListener | ( | MSvgInteractiveElementListener * | aListener | ) |
MSvgInteractiveElementListener * aListener |
void | RemoveMouseListener | ( | const MSvgMouseListener * | aListener | ) |
Remove a MSvgMouseListener to this SvgEngine
const MSvgMouseListener * aListener |
void | RemoveTextAreaListener | ( | MSvgTextAreaListener * | aListener | ) |
Remove a textbox listener.
MSvgTextAreaListener * aListener |
void | RemoveTextListener | ( | MSvgTextListener * | aListener | ) |
MSvgTextListener * aListener |
void | RemoveViewPortListener | ( | MSvgViewPortListener * | aListener | ) |
MSvgViewPortListener * aListener |
void | RenderFileL | ( | const TDesC8 & | aSvgData, |
CFbsBitmap * | aFrameBuffer, | |||
CFbsBitmap * | aMask, | |||
TBool | aPreserveAspectRatio | |||
) |
const TDesC8 & aSvgData | |
CFbsBitmap * aFrameBuffer | |
CFbsBitmap * aMask | |
TBool aPreserveAspectRatio |
TInt | RenderFileToBuffer | ( | const TDesC8 & | aSvgData, |
CFbsBitmap * | aFrameBuffer, | |||
CFbsBitmap * | aMask, | |||
TBool | aPreserveAspectRatio | |||
) |
Internally render SVG source into a buffer (rasterization)
const TDesC8 & aSvgData | - A string buffer containing the SVG source |
CFbsBitmap * aFrameBuffer | - A bitmap passed by the client that will contain the raster |
CFbsBitmap * aMask | |
TBool aPreserveAspectRatio | - The aspect ratio (see SVG spec for more) for the raster |
void | SaveSvgL | ( | const TDesC & | aFileName | ) |
Save Svg File After doing the text editing
const TDesC & aFileName |
TBool | ScriptCall | ( | const TDesC & | aScript, |
CSvgElementImpl * | aCallerElement | |||
) |
This method is for future extension, in which an external script engine could be used to evaluate a script description.
const TDesC & aScript | |
CSvgElementImpl * aCallerElement |
void | SetAudioVolume | ( | TInt | aPercentage | ) |
This method sets the volume with user input as a percentage value (unsigned between 0 and 100 ) for the currently loaded document
TInt aPercentage | percentage value of volume |
void | SetBackgroundColor | ( | TUint32 | aRGBA8888Color | ) |
Set background color
TUint32 aRGBA8888Color |
void | SetBitmapHeader | ( | const TDesC * | aHeaderData | ) |
const TDesC * aHeaderData |
void | SetDocument | ( | CSvgDocumentImpl * | aDocument | ) |
Set the Document
CSvgDocumentImpl * aDocument |
void | SetGdiContextL | ( | CFbsBitmap * | aCurrentBitmap, |
CFbsBitmap * | aMask = NULL | |||
) |
Sets the GDI context from the Bitmap.
CFbsBitmap * aCurrentBitmap | |
CFbsBitmap * aMask = NULL |
void | SetGdiContextL | ( | CFbsBitmap * | aCurrentBitmap, |
CFbsBitmap * | aMask, | |||
TSize | aCurrentBitmapSize, | |||
TDisplayMode | aRenderDspMode, | |||
TDisplayMode | aMaskDspMode | |||
) |
CFbsBitmap * aCurrentBitmap | |
CFbsBitmap * aMask | |
TSize aCurrentBitmapSize | |
TDisplayMode aRenderDspMode | |
TDisplayMode aMaskDspMode |
void | SetIgnoreUpdateScreen | ( | TBool | aBool | ) |
Set to ETrue to ignore notification to UpdateScreen in RequestObserver
TBool aBool |
void | SetMediaTime | ( | TUint32 | aTimeInMilliSeconds | ) |
TUint32 aTimeInMilliSeconds |
void | SetRenderingQuality | ( | const TInt32 | aRenderQuality | ) |
const TInt32 aRenderQuality |
void | SetSVGEngineState | ( | TSvgEngineState | aState | ) |
Sets SVG Engine state
TSvgEngineState aState |
void | SetSvgDimensionToFrameBufferL | ( | TUint | aWidth, |
TUint | aHeight | |||
) |
Set SVG Dimensions to Frame buffer size
void | StartEngine | ( | CSvgErrorImpl * | aError = NULL | ) |
Start the Engine so that the first frame is drawn when the call is finished.
CSvgErrorImpl * aError = NULL |
TBool | StartFrameLoopL | ( | ) |
Kick off the processing of SVG source, and animation time frames
void | SwitchDebugInfo | ( | TBool | debug | ) |
A private method that toggles debug info for developers
TBool debug |
HBufC * | TextAreaTagProcessingL | ( | TPtrC * | aCData, |
TInt & | aStartOffset, | |||
TInt | aOrgLength, | |||
TBool | aEndingWithTag | |||
) |
HBufC * | TextTagProcessingL | ( | TPtrC * | aCData, |
TInt & | aStartOffset, | |||
TInt | aOrgLength, | |||
TBool | aEndingWithTag | |||
) |
void | UpdateCTM | ( | CSvgDocumentImpl * | aSvgDocument | ) |
Kick off the process of placing graphical objects in their positions for rasterization
CSvgDocumentImpl * aSvgDocument |
void | UpdatePath | ( | CGfxGeneralPath * | hPath, |
CSvgElementImpl * | hElement | |||
) |
Overwrite the current path information in the given element
CGfxGeneralPath * hPath | - handle to a path |
CSvgElementImpl * hElement | - handle to a path element |
void | UpdatePresentation | ( | const TInt32 & | aParam | ) |
Need method description
const TInt32 & aParam |
TInt | WriteToStream | ( | RFileWriteStream & | aStream, |
TPtrC | aWriteBuffer | |||
) |
RFileWriteStream & aStream | |
TPtrC aWriteBuffer |
RPointerArray< MSvgAnimationListener > | iAnimationListeners | [private] |
RPointerArray< MSvgHyperlinkListener > | iHyperlinkListeners | [private] |
RPointerArray< MSvgInteractiveElementListener > | iInteractiveElementListeners | [private] |
CSvgBitmapFontProvider * | iSvgBitmapFontProvider | [private] |
RPointerArray< MSvgMouseListener > | iSvgMouseListeners | [private] |
RPointerArray< TSvgFourPointRect > | iSvgTextBoundingBoxes |
RPointerArray< MSvgTextAreaListener > | iTextAreaListeners | [private] |
RPointerArray< MSvgTextListener > | iTextListeners | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.