Namespace: render

olx.render


import render from 'olx/render';

Type Definitions

olx.render.State{Object}

Properties:
Name Type Description
context CanvasRenderingContext2D

Canvas context that the layer is being rendered to. Required.

pixelRatio number

Pixel ratio used by the layer renderer. Required.

resolution number

Resolution that the render batch was created and optimized for. This is not the view's resolution that is being rendered. Required.

rotation number

Rotation of the rendered layer in radians. Required.

olx.render.ToContextOptions{Object}

Properties:
Name Type Argument Description
size ol.Size | undefined <optional>

Desired size of the canvas in css pixels. When provided, both canvas and css size will be set according to the pixelRatio. If not provided, the current canvas and css sizes will not be altered.

pixelRatio number | undefined <optional>

Pixel ratio (canvas pixel to css pixel ratio) for the canvas. Default is the detected device pixel ratio.