# Class: Immediate

## ol.render.canvas.Immediate

### Extends

- ol.render.IVectorContext

### Methods

#### drawAsync(zIndex, callback) experimental

src/ol/render/canvas/canvasimmediate.js, line 399

  Register a function to be called for rendering at a given zIndex. The function will be called asynchronously. The callback will receive a reference to `ol.render.canvas.Immediate` context for drawing.

  Name | Type | Description
  --- | --- | ---
  `zIndex` | number | Z index.
  `callback` | function | Callback.

#### drawCircleGeometry(circleGeometry, data) experimental

src/ol/render/canvas/canvasimmediate.js, line 418

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

  Name | Type | Description
  --- | --- | ---
  `circleGeometry` | ol.geom.Circle | Circle geometry.
  `data` | Object | Opaque data object,

#### drawFeature(feature, style) experimental

src/ol/render/canvas/canvasimmediate.js, line 463

  Render a feature into the canvas. In order to respect the zIndex of the style this method draws asynchronously and thus after calls to drawXxxxGeometry have been finished, effectively drawing the feature on top of everything else. You probably should be using `ol.FeatureOverlay` instead of calling this method directly.

  Name | Type | Description
  --- | --- | ---
  `feature` | ol.Feature | Feature.
  `style` | ol.style.Style | Style.

#### drawLineStringGeometry(lineStringGeometry, data) experimental

src/ol/render/canvas/canvasimmediate.js, line 557

  Render a LineString into the canvas. Rendering is immediate and uses the current style.

  Name | Type | Description
  --- | --- | ---
  `lineStringGeometry` | ol.geom.LineString | Line string geometry.
  `data` | Object | Opaque data object.

#### drawMultiLineStringGeometry(multiLineStringGeometry, data) experimental

src/ol/render/canvas/canvasimmediate.js, line 587

  Render a MultiLineString geometry into the canvas. Rendering is immediate and uses the current style.

  Name | Type | Description
  --- | --- | ---
  `multiLineStringGeometry` | ol.geom.MultiLineString | MultiLineString geometry.
  `data` | Object | Opaque data object.

#### drawMultiPointGeometry(multiPointGeometry, data) experimental

src/ol/render/canvas/canvasimmediate.js, line 536

  Render a MultiPoint geometry into the canvas. Rendering is immediate and uses the current style.

  Name | Type | Description
  --- | --- | ---
  `multiPointGeometry` | ol.geom.MultiPoint | MultiPoint geometry.
  `data` | Object | Opaque data object.

#### drawMultiPolygonGeometry(multiPolygonGeometry, data) experimental

src/ol/render/canvas/canvasimmediate.js, line 662

  Render MultiPolygon geometry into the canvas. Rendering is immediate and uses the current style.

  Name | Type | Description
  --- | --- | ---
  `multiPolygonGeometry` | ol.geom.MultiPolygon | MultiPolygon geometry.
  `data` | Object | Opaque data object.

#### drawPointGeometry(pointGeometry, data) experimental

src/ol/render/canvas/canvasimmediate.js, line 515

  Render a Point geometry into the canvas. Rendering is immediate and uses the current style.

  Name | Type | Description
  --- | --- | ---
  `pointGeometry` | ol.geom.Point | Point geometry.
  `data` | Object | Opaque data object.

#### drawPolygonGeometry(polygonGeometry, data) experimental

src/ol/render/canvas/canvasimmediate.js, line 623

  Render a Polygon geometry into the canvas. Rendering is immediate and uses the current style.

  Name | Type | Description
  --- | --- | ---
  `polygonGeometry` | ol.geom.Polygon | Polygon geometry.
  `data` | Object | Opaque data object.

#### setFillStrokeStyle(fillStyle, strokeStyle) experimental

src/ol/render/canvas/canvasimmediate.js, line 837

  Set the fill and stroke style for subsequent draw operations. To clear either fill or stroke styles, pass null for the appropriate parameter.

  Name | Type | Description
  --- | --- | ---
  `fillStyle` | ol.style.Fill | Fill style.
  `strokeStyle` | ol.style.Stroke | Stroke style.

#### setImageStyle(imageStyle) experimental

src/ol/render/canvas/canvasimmediate.js, line 882

  Set the image style for subsequent draw operations. Pass null to remove the image style.

  Name | Type | Description
  --- | --- | ---
  `imageStyle` | ol.style.Image | Image style.

#### setTextStyle(textStyle) experimental

src/ol/render/canvas/canvasimmediate.js, line 918

  Set the text style for subsequent draw operations. Pass null to remove the text style.

  Name | Type | Description
  --- | --- | ---
  `textStyle` | ol.style.Text | Text style.