Class: CanvasImmediateRenderer

ol/render/canvas/Immediate~CanvasImmediateRenderer


A concrete subclass of module:ol/render/VectorContext that implements direct rendering of features and geometries to an HTML5 Canvas context. Instances of this class are created internally by the library and provided to application code as vectorContext member of the module:ol/render/Event~RenderEvent object associated with postcompose, precompose and render events emitted by layers and maps.

Extends

Methods

drawCircle(geometry) inherited

render/canvas/Immediate.js, line 396

Render a circle geometry into the canvas. Rendering is immediate and uses the current fill and stroke styles.

Name Type Description
geometry module:ol/geom/Circle~Circle

Circle geometry.

drawFeature(feature, style) inherited

render/canvas/Immediate.js, line 499

Render a feature into the canvas. Note that any zIndex on the provided style will be ignored - features are rendered immediately in the order that this method is called. If you need zIndex support, you should be using an module:ol/layer/Vector~VectorLayer instead.

Name Type Description
feature module:ol/Feature~Feature

Feature.

style module:ol/style/Style~Style

Style.

drawGeometry(geometry) inherited

render/canvas/Immediate.js, line 457

Render a geometry into the canvas. Call module:ol/render/canvas/Immediate#setStyle first to set the rendering style.

Name Type Description
geometry module:ol/geom/Geometry~Geometry | module:ol/render/Feature~RenderFeature

The geometry to render.

setStyle(style) inherited

render/canvas/Immediate.js, line 436

Set the rendering style. Note that since this is an immediate rendering API, any zIndex on the provided style will be ignored.

Name Type Description
style module:ol/style/Style~Style

The rendering style.