@univerjs/engine-render v0.5.4
Class: SceneCanvas
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:205
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
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:206
Parameters
Parameter | Type |
---|---|
props | ICanvasProps |
Returns
Overrides
Properties
Property | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|
isCache | boolean | false | Canvas .isCache | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:57 |
Methods
clear()
clear(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:174
Returns
void
Inherited from
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:167
Returns
void
Inherited from
getCanvasEle()
getCanvasEle(): HTMLCanvasElement
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:101
Returns
HTMLCanvasElement
Inherited from
getContext()
getContext(): UniverRenderingContext
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:110
get canvas context
Returns
context
Method
Inherited from
getHeight()
getHeight(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:122
Returns
number
Inherited from
getPixelRatio()
getPixelRatio(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:114
Returns
number
Inherited from
getWidth()
getWidth(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:118
Returns
number
Inherited from
setId()
setId(id): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:126
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Inherited from
setPixelRatio()
setPixelRatio(pixelRatio): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:157
Parameters
Parameter | Type |
---|---|
pixelRatio | number |
Returns
void
Inherited from
setSize()
setSize(
width?,
height?,
devicePixelRatio?): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:136
Resize canvas when width or height or devicePixelRatio changed.
Parameters
Parameter | Type |
---|---|
width ? | number |
height ? | number |
devicePixelRatio ? | number |
Returns
void
Inherited from
toDataURL()
toDataURL(mimeType, quality): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/canvas.ts:186
to data url
Parameters
Parameter | Type | Description |
---|---|---|
mimeType | string | - |
quality | number | between 0 and 1 for jpg mime types |
Returns
string
data url string