@univerjs/engine-render v0.5.0-beta.1Docs


Class: SceneCanvas

View Renderer constructor. It is a wrapper around native canvas element. Usually you don’t need to use it manually.

Param

Param

Param

Param

Extends

Constructors

new SceneCanvas()

new SceneCanvas(props): SceneCanvas

Parameters

ParameterType
propsICanvasProps

Returns

SceneCanvas

Overrides

Canvas.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:206

Properties

PropertyTypeDefault valueInherited fromDefined in
isCachebooleanfalseCanvas.isCachepackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:57

Methods

clear()

clear(): void

Returns

void

Inherited from

Canvas.clear

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:174


dispose()

dispose(): void

Returns

void

Inherited from

Canvas.dispose

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:167


getCanvasEle()

getCanvasEle(): HTMLCanvasElement

Returns

HTMLCanvasElement

Inherited from

Canvas.getCanvasEle

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:105


getContext()

getContext(): UniverRenderingContext

get canvas context

Returns

UniverRenderingContext

context

Method

Inherited from

Canvas.getContext

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:114


getHeight()

getHeight(): number

Returns

number

Inherited from

Canvas.getHeight

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:126


getPixelRatio()

getPixelRatio(): number

Returns

number

Inherited from

Canvas.getPixelRatio

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:118


getWidth()

getWidth(): number

Returns

number

Inherited from

Canvas.getWidth

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:122


setId()

setId(id): void

Parameters

ParameterType
idstring

Returns

void

Inherited from

Canvas.setId

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:130


setPixelRatio()

setPixelRatio(pixelRatio): void

Parameters

ParameterType
pixelRationumber

Returns

void

Inherited from

Canvas.setPixelRatio

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:157


setSize()

setSize(
   width?, 
   height?, 
   pixelRatioParam?): void

Parameters

ParameterType
width?number
height?number
pixelRatioParam?number

Returns

void

Inherited from

Canvas.setSize

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:134


toDataURL()

toDataURL(mimeType, quality): string

to data url

Parameters

ParameterTypeDescription
mimeTypestring-
qualitynumberbetween 0 and 1 for jpg mime types

Returns

string

data url string

Method

Inherited from

Canvas.toDataURL

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:186