- Legend to Symbols

-
Class ovi.mapsapi.gfx.Painter
Class Summary
The painter class is an abstract base class for all painter implementations. A painter will render an ovi.mapsapi.gfx.IDL using a specific method, e.g. via a CANVAS tag (ovi.mapsapi.gfx.CanvasPainter), an SVG DOM node (ovi.mapsapi.gfx.SvgPainter) or a VML DOM node (ovi.mapsapi.gfx.VmlPainter).
Method Summary
abstract
createElement
(idl, [doc, [opacity]])
: Node
This method will render the supplied IDL and return a DOM node that can be added into the supplied document.
abstract
setOpacity
(element, opacity)
Changes the global opacity of an element returned by the
createElement method.
abstract
updateElement
(idl, node, [opacity])
This method will update a DOM node that was previously returned by the
createElement method to the given IDL.
Field Summary
static
Function
defaultPainter
The reference to the constructor of the default painter that can be used with the current browser / platform.
Method Detail
abstract
createElement
(idl, [doc, [opacity]])
: Node
This method will render the supplied IDL and return a DOM node that can be added into the supplied document.
The node shall contains "something" (VML, SVG, Canvas tag or whatever is suitable) that will reflect the
image described by the IDL.
Parameters:
| {ovi.mapsapi.gfx.IDL} | idl | The IDL describing the image to be rendered. |
| {Document} | [doc]: | The reference to the document for which the painter shall create an element, if omitted the current document shall be used. |
| {Number} | [opacity]: | The opacity with which the element shall be created, if omitted or an invalid value 1.0 (opaque) is used. Must be a number between 0 (transparent) and 1 (opaque). |
Returns:
| {Node} | The DOM node that can be added into the given DOM node and represents the image described by the supplied IDL. |
abstract
setOpacity
(element, opacity)
Changes the global opacity of an element returned by the
createElement method.
Parameters:
| {Node} | element |
The DOM node that was returned by the createElement method.
|
| {Number} | opacity | The global opacity for the node as a number between 0 and 1. |
abstract
updateElement
(idl, node, [opacity])
This method will update a DOM node that was previously returned by the
createElement method
to the given IDL. This can result in a complete re-rendering of the node's content or in a partial update,
dependent on the painter implementation and the amount of changes done to the IDL.
Parameters:
| {ovi.mapsapi.gfx.IDL} | idl | The IDL describing the image to be rendered. |
| {Node} | node |
The DOM node that was previously returned by the createElement method and which shall be
updated.
|
| {Number} | [opacity]: | The opacity with which the element shall be update, if omitted or an invalid value 1.0 (opaque) is used. Must be a number between 0 (transparent) and 1 (opaque). |
Field Detail
static
Function
defaultPainter
The reference to the constructor of the default painter that can be used with the current browser / platform.
Note: The default painter needs not to be the best painter, but it must be a painter that is fully supported by the current browser / platform. It may happen that there is no default painter, so this property might been null.
Note: The default painter needs not to be the best painter, but it must be a painter that is fully supported by the current browser / platform. It may happen that there is no default painter, so this property might been null.