@univerjsengine-renderclassesUniverrenderingcontext

@univerjs/engine-render v0.5.4


Class: UniverRenderingContext

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:1012

Extends

Constructors

new UniverRenderingContext()

new UniverRenderingContext(context): UniverRenderingContext

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:34

Parameters

ParameterType
contextCanvasRenderingContext2D

Returns

UniverRenderingContext

Inherited from

UniverRenderingContext2D.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
__modepublicstring'rendering'-UniverRenderingContext2D.__modepackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:23
_contextpublicCanvasRenderingContext2Dundefined-UniverRenderingContext2D._contextpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:28
canvasreadonlyHTMLCanvasElementundefinedMDN ReferenceUniverRenderingContext2D.canvaspackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:26
renderConfigpublicReadonly<IRenderConfig>{}-UniverRenderingContext2D.renderConfigpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:32

Accessors

direction

Get Signature

get direction(): CanvasDirection

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:205

MDN Reference

Returns

CanvasDirection

Set Signature

set direction(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:209

MDN Reference

Parameters
ParameterType
valCanvasDirection
Returns

void

Inherited from

UniverRenderingContext2D.direction


fillStyle

Get Signature

get fillStyle(): string | CanvasGradient | CanvasPattern

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:73

MDN Reference

Returns

string | CanvasGradient | CanvasPattern

Set Signature

set fillStyle(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:77

MDN Reference

Parameters
ParameterType
valstring | CanvasGradient | CanvasPattern
Returns

void

Inherited from

UniverRenderingContext2D.fillStyle


filter

Get Signature

get filter(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:91

MDN Reference

Returns

string

Set Signature

set filter(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:95

MDN Reference

Parameters
ParameterType
valstring
Returns

void

Inherited from

UniverRenderingContext2D.filter


font

Get Signature

get font(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:214

MDN Reference

Returns

string

Set Signature

set font(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:218

MDN Reference

Parameters
ParameterType
valstring
Returns

void

Inherited from

UniverRenderingContext2D.font


fontKerning

Get Signature

get fontKerning(): CanvasFontKerning

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:223

MDN Reference

Returns

CanvasFontKerning

Set Signature

set fontKerning(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:227

MDN Reference

Parameters
ParameterType
valCanvasFontKerning
Returns

void

Inherited from

UniverRenderingContext2D.fontKerning


fontStretch

Get Signature

get fontStretch(): CanvasFontStretch

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:232

MDN Reference

Returns

CanvasFontStretch

Set Signature

set fontStretch(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:237

MDN Reference

Parameters
ParameterType
valCanvasFontStretch
Returns

void

Inherited from

UniverRenderingContext2D.fontStretch


fontVariantCaps

Get Signature

get fontVariantCaps(): CanvasFontVariantCaps

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:243

MDN Reference

Returns

CanvasFontVariantCaps

Set Signature

set fontVariantCaps(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:248

MDN Reference

Parameters
ParameterType
valCanvasFontVariantCaps
Returns

void

Inherited from

UniverRenderingContext2D.fontVariantCaps


globalAlpha

Get Signature

get globalAlpha(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:55

MDN Reference

Returns

number

Set Signature

set globalAlpha(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:59

MDN Reference

Parameters
ParameterType
valnumber
Returns

void

Inherited from

UniverRenderingContext2D.globalAlpha


globalCompositeOperation

Get Signature

get globalCompositeOperation(): GlobalCompositeOperation

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:64

MDN Reference

Returns

GlobalCompositeOperation

Set Signature

set globalCompositeOperation(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:68

MDN Reference

Parameters
ParameterType
valGlobalCompositeOperation
Returns

void

Inherited from

UniverRenderingContext2D.globalCompositeOperation


imageSmoothingEnabled

Get Signature

get imageSmoothingEnabled(): boolean

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:100

MDN Reference

Returns

boolean

Set Signature

set imageSmoothingEnabled(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:104

MDN Reference

Parameters
ParameterType
valboolean
Returns

void

Inherited from

UniverRenderingContext2D.imageSmoothingEnabled


imageSmoothingQuality

Get Signature

get imageSmoothingQuality(): ImageSmoothingQuality

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:109

MDN Reference

Returns

ImageSmoothingQuality

Set Signature

set imageSmoothingQuality(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:113

MDN Reference

Parameters
ParameterType
valImageSmoothingQuality
Returns

void

Inherited from

UniverRenderingContext2D.imageSmoothingQuality


letterSpacing

Get Signature

get letterSpacing(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:254

MDN Reference

Returns

string

Set Signature

set letterSpacing(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:259

MDN Reference

Parameters
ParameterType
valstring
Returns

void

Inherited from

UniverRenderingContext2D.letterSpacing


lineCap

Get Signature

get lineCap(): CanvasLineCap

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:118

MDN Reference

Returns

CanvasLineCap

Set Signature

set lineCap(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:122

MDN Reference

Parameters
ParameterType
valCanvasLineCap
Returns

void

Inherited from

UniverRenderingContext2D.lineCap


lineDashOffset

Get Signature

get lineDashOffset(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:127

MDN Reference

Returns

number

Set Signature

set lineDashOffset(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:131

MDN Reference

Parameters
ParameterType
valnumber
Returns

void

Inherited from

UniverRenderingContext2D.lineDashOffset


lineJoin

Get Signature

get lineJoin(): CanvasLineJoin

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:136

MDN Reference

Returns

CanvasLineJoin

Set Signature

set lineJoin(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:140

MDN Reference

Parameters
ParameterType
valCanvasLineJoin
Returns

void

Inherited from

UniverRenderingContext2D.lineJoin


lineWidth

Get Signature

get lineWidth(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:145

MDN Reference

Returns

number

Set Signature

set lineWidth(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:149

MDN Reference

Parameters
ParameterType
valnumber
Returns

void

Inherited from

UniverRenderingContext2D.lineWidth


miterLimit

Get Signature

get miterLimit(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:160

MDN Reference

Returns

number

Set Signature

set miterLimit(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:164

MDN Reference

Parameters
ParameterType
valnumber
Returns

void

Inherited from

UniverRenderingContext2D.miterLimit


shadowBlur

Get Signature

get shadowBlur(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:169

MDN Reference

Returns

number

Set Signature

set shadowBlur(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:173

MDN Reference

Parameters
ParameterType
valnumber
Returns

void

Inherited from

UniverRenderingContext2D.shadowBlur


shadowColor

Get Signature

get shadowColor(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:178

MDN Reference

Returns

string

Set Signature

set shadowColor(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:182

MDN Reference

Parameters
ParameterType
valstring
Returns

void

Inherited from

UniverRenderingContext2D.shadowColor


shadowOffsetX

Get Signature

get shadowOffsetX(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:187

MDN Reference

Returns

number

Set Signature

set shadowOffsetX(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:191

MDN Reference

Parameters
ParameterType
valnumber
Returns

void

Inherited from

UniverRenderingContext2D.shadowOffsetX


shadowOffsetY

Get Signature

get shadowOffsetY(): number

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:196

MDN Reference

Returns

number

Set Signature

set shadowOffsetY(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:200

MDN Reference

Parameters
ParameterType
valnumber
Returns

void

Inherited from

UniverRenderingContext2D.shadowOffsetY


strokeStyle

Get Signature

get strokeStyle(): string | CanvasGradient | CanvasPattern

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:82

MDN Reference

Returns

string | CanvasGradient | CanvasPattern

Set Signature

set strokeStyle(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:86

MDN Reference

Parameters
ParameterType
valstring | CanvasGradient | CanvasPattern
Returns

void

Inherited from

UniverRenderingContext2D.strokeStyle


textAlign

Get Signature

get textAlign(): CanvasTextAlign

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:287

MDN Reference

Returns

CanvasTextAlign

Set Signature

set textAlign(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:291

MDN Reference

Parameters
ParameterType
valCanvasTextAlign
Returns

void

Inherited from

UniverRenderingContext2D.textAlign


textBaseline

Get Signature

get textBaseline(): CanvasTextBaseline

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:296

MDN Reference

Returns

CanvasTextBaseline

Set Signature

set textBaseline(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:300

MDN Reference

Parameters
ParameterType
valCanvasTextBaseline
Returns

void

Inherited from

UniverRenderingContext2D.textBaseline


textRendering

Get Signature

get textRendering(): CanvasTextRendering

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:265

MDN Reference

Returns

CanvasTextRendering

Set Signature

set textRendering(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:270

MDN Reference

Parameters
ParameterType
valCanvasTextRendering
Returns

void

Inherited from

UniverRenderingContext2D.textRendering


wordSpacing

Get Signature

get wordSpacing(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:276

MDN Reference

Returns

string

Set Signature

set wordSpacing(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:281

MDN Reference

Parameters
ParameterType
valstring
Returns

void

Inherited from

UniverRenderingContext2D.wordSpacing

Methods

_getScale()

protected _getScale(): {
  scaleX: number;
  scaleY: number;
}

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:308

Get scale from ctx. DOMMatrix.a DOMMatrix.d would affect by ctx.rotate()

Returns

{
  scaleX: number;
  scaleY: number;
}
NameTypeDefined in
scaleXnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:317
scaleYnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:318

Inherited from

UniverRenderingContext2D._getScale


arc()

arc(
   x, 
   y, 
   radius, 
   startAngle, 
   endAngle, 
   counterClockwise?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:397

arc function.

Parameters

ParameterType
xnumber
ynumber
radiusnumber
startAnglenumber
endAnglenumber
counterClockwise?boolean

Returns

void

Method

Inherited from

UniverRenderingContext2D.arc


arcByPrecision()

arcByPrecision(
   x, 
   y, 
   radius, 
   startAngle, 
   endAngle, 
   counterClockwise?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:405

arc function.

Parameters

ParameterType
xnumber
ynumber
radiusnumber
startAnglenumber
endAnglenumber
counterClockwise?boolean

Returns

void

Method

Inherited from

UniverRenderingContext2D.arcByPrecision


arcTo()

arcTo(
   x1, 
   y1, 
   x2, 
   y2, 
   radius): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:418

arcTo function.

Parameters

ParameterType
x1number
y1number
x2number
y2number
radiusnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.arcTo


arcToByPrecision()

arcToByPrecision(
   x1, 
   y1, 
   x2, 
   y2, 
   radius): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:427

arcTo function.

Parameters

ParameterType
x1number
y1number
x2number
y2number
radiusnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.arcToByPrecision


beginPath()

beginPath(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:441

beginPath function.

Returns

void

Method

Inherited from

UniverRenderingContext2D.beginPath


bezierCurveTo()

bezierCurveTo(
   cp1x, 
   cp1y, 
   cp2x, 
   cp2y, 
   x, 
   y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:449

bezierCurveTo function.

Parameters

ParameterType
cp1xnumber
cp1ynumber
cp2xnumber
cp2ynumber
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.bezierCurveTo


bezierCurveToByPrecision()

bezierCurveToByPrecision(
   cp1x, 
   cp1y, 
   cp2x, 
   cp2y, 
   x, 
   y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:457

bezierCurveTo function precision.

Parameters

ParameterType
cp1xnumber
cp1ynumber
cp2xnumber
cp2ynumber
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.bezierCurveToByPrecision


clearRect()

clearRect(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:473

clearRect function.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.clearRect


clearRectByPrecision()

clearRectByPrecision(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:481

clearRect function.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.clearRectByPrecision


clearRectForTexture()

clearRectForTexture(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:1003

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Inherited from

UniverRenderingContext2D.clearRectForTexture


clip()

Call Signature

clip(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:495

clip function.

Returns

void

Method
Inherited from

UniverRenderingContext2D.clip

Call Signature

clip(path): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:497

clip function.

Parameters
ParameterType
pathPath2D
Returns

void

Method
Inherited from

UniverRenderingContext2D.clip

Call Signature

clip(fillRule?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:499

MDN Reference

Parameters
ParameterType
fillRule?CanvasFillRule
Returns

void

Inherited from

UniverRenderingContext2D.clip

Call Signature

clip(path, fillRule?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:501

clip function.

Parameters
ParameterType
pathPath2D
fillRule?CanvasFillRule
Returns

void

Method
Inherited from

UniverRenderingContext2D.clip


closePath()

closePath(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:511

closePath function.

Returns

void

Method

Inherited from

UniverRenderingContext2D.closePath


closePathByEnv()

closePathByEnv(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:532

Chrome hardware acceleration causes canvas stroke to fail to draw lines on Mac.

Returns

void

Inherited from

UniverRenderingContext2D.closePathByEnv


createConicGradient()

createConicGradient(
   startAngle, 
   x, 
   y): CanvasGradient

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:338

MDN Reference

Parameters

ParameterType
startAnglenumber
xnumber
ynumber

Returns

CanvasGradient

Inherited from

UniverRenderingContext2D.createConicGradient


createImageData()

Call Signature

createImageData(
   width, 
   height, 
   settings?): ImageData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:549

createImageData function.

Parameters
ParameterType
widthnumber
heightnumber
settings?ImageDataSettings
Returns

ImageData

Method
Inherited from

UniverRenderingContext2D.createImageData

Call Signature

createImageData(imagedata): ImageData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:551

createImageData function.

Parameters
ParameterType
imagedataImageData
Returns

ImageData

Method
Inherited from

UniverRenderingContext2D.createImageData


createLinearGradient()

createLinearGradient(
   x0, 
   y0, 
   x1, 
   y1): CanvasGradient

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:570

createLinearGradient function.

Parameters

ParameterType
x0number
y0number
x1number
y1number

Returns

CanvasGradient

Method

Inherited from

UniverRenderingContext2D.createLinearGradient


createPattern()

createPattern(image, repetition): null | CanvasPattern

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:578

createPattern function.

Parameters

ParameterType
imageCanvasImageSource
repetitionnull | string

Returns

null | CanvasPattern

Method

Inherited from

UniverRenderingContext2D.createPattern


createRadialGradient()

createRadialGradient(
   x0, 
   y0, 
   r0, 
   x1, 
   y1, 
   r1): CanvasGradient

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:586

createRadialGradient function.

Parameters

ParameterType
x0number
y0number
r0number
x1number
y1number
r1number

Returns

CanvasGradient

Method

Inherited from

UniverRenderingContext2D.createRadialGradient


drawFocusIfNeeded()

Call Signature

drawFocusIfNeeded(element): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:378

MDN Reference

Parameters
ParameterType
elementElement
Returns

void

Inherited from

UniverRenderingContext2D.drawFocusIfNeeded

Call Signature

drawFocusIfNeeded(path, element): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:379

Parameters
ParameterType
pathPath2D
elementElement
Returns

void

Inherited from

UniverRenderingContext2D.drawFocusIfNeeded


drawImage()

drawImage(
   image, 
   sx, 
   sy, 
   sWidth?, 
   sHeight?, 
   dx?, 
   dy?, 
   dWidth?, 
   dHeight?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:594

drawImage function.

Parameters

ParameterType
imageCanvasImageSource
sxnumber
synumber
sWidth?number
sHeight?number
dx?number
dy?number
dWidth?number
dHeight?number

Returns

void

Method

Inherited from

UniverRenderingContext2D.drawImage


ellipse()

ellipse(
   x, 
   y, 
   radiusX, 
   radiusY, 
   rotation, 
   startAngle, 
   endAngle, 
   counterclockwise?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:634

ellipse function.

Parameters

ParameterType
xnumber
ynumber
radiusXnumber
radiusYnumber
rotationnumber
startAnglenumber
endAnglenumber
counterclockwise?boolean

Returns

void

Method

Inherited from

UniverRenderingContext2D.ellipse


fill()

Call Signature

fill(fillRule?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:670

fill function.

Parameters
ParameterType
fillRule?CanvasFillRule
Returns

void

Method
Inherited from

UniverRenderingContext2D.fill

Call Signature

fill(path, fillRule?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:672

fill function.

Parameters
ParameterType
pathPath2D
fillRule?CanvasFillRule
Returns

void

Method
Inherited from

UniverRenderingContext2D.fill


fillRect()

fillRect(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:684

fillRect function.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.fillRect


fillRectByPrecision()

fillRectByPrecision(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:692

fillRect function precision.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.fillRectByPrecision


fillText()

fillText(
   text, 
   x, 
   y, 
   maxWidth?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:728

fillText function.

Parameters

ParameterType
textstring
xnumber
ynumber
maxWidth?number

Returns

void

Method

Inherited from

UniverRenderingContext2D.fillText


fillTextPrecision()

fillTextPrecision(
   text, 
   x, 
   y, 
   maxWidth?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:746

fillText function.

Parameters

ParameterType
textstring
xnumber
ynumber
maxWidth?number

Returns

void

Method

Inherited from

UniverRenderingContext2D.fillTextPrecision


getBrowserType()

getBrowserType(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:522

Returns

string

Inherited from

UniverRenderingContext2D.getBrowserType


getContextAttributes()

getContextAttributes(): CanvasRenderingContext2DSettings

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:326

MDN Reference

Returns

CanvasRenderingContext2DSettings

Inherited from

UniverRenderingContext2D.getContextAttributes


getId()

getId(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:41

Returns

string

Inherited from

UniverRenderingContext2D.getId


getImageData()

getImageData(
   sx, 
   sy, 
   sw, 
   sh): ImageData

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:772

getImageData function.

Parameters

ParameterType
sxnumber
synumber
swnumber
shnumber

Returns

ImageData

Method

Inherited from

UniverRenderingContext2D.getImageData


getLineDash()

getLineDash(): number[]

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:919

getLineDash function.

Returns

number[]

Method

Inherited from

UniverRenderingContext2D.getLineDash


getScale()

getScale(): {
  scaleX: number;
  scaleY: number;
}

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:322

Returns

{
  scaleX: number;
  scaleY: number;
}
NameTypeDefined in
scaleXnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:317
scaleYnumberpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:318

Inherited from

UniverRenderingContext2D.getScale


getSystemType()

getSystemType(): string

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:515

Returns

string

Inherited from

UniverRenderingContext2D.getSystemType


getTransform()

getTransform(): DOMMatrix

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:368

MDN Reference

Returns

DOMMatrix

Inherited from

UniverRenderingContext2D.getTransform


isContextLost()

isContextLost(): boolean

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:49

MDN Reference

Returns

boolean

Inherited from

UniverRenderingContext2D.isContextLost


isPointInPath()

Call Signature

isPointInPath(
   x, 
   y, 
   fillRule?): boolean

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:658

isPointInPath function.

Parameters
ParameterType
xnumber
ynumber
fillRule?CanvasFillRule
Returns

boolean

Method
Inherited from

UniverRenderingContext2D.isPointInPath

Call Signature

isPointInPath(
   path, 
   x, 
   y, 
   fillRule?): boolean

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:660

isPointInPath function.

Parameters
ParameterType
pathPath2D
xnumber
ynumber
fillRule?CanvasFillRule
Returns

boolean

Method
Inherited from

UniverRenderingContext2D.isPointInPath


isPointInStroke()

Call Signature

isPointInStroke(x, y): boolean

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:330

MDN Reference

Parameters
ParameterType
xnumber
ynumber
Returns

boolean

Inherited from

UniverRenderingContext2D.isPointInStroke

Call Signature

isPointInStroke(
   path, 
   x, 
   y): boolean

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:332

Parameters
ParameterType
pathPath2D
xnumber
ynumber
Returns

boolean

Inherited from

UniverRenderingContext2D.isPointInStroke


lineTo()

lineTo(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:780

lineTo function.

Parameters

ParameterType
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.lineTo


lineToByPrecision()

lineToByPrecision(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:788

lineTo function precision.

Parameters

ParameterType
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.lineToByPrecision


measureText()

measureText(text): TextMetrics

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:764

measureText function.

Parameters

ParameterType
textstring

Returns

TextMetrics

Method

Inherited from

UniverRenderingContext2D.measureText


moveTo()

moveTo(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:800

moveTo function.

Parameters

ParameterType
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.moveTo


moveToByPrecision()

moveToByPrecision(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:808

moveTo function precision.

Parameters

ParameterType
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.moveToByPrecision


moveToByPrecisionLog()

moveToByPrecisionLog(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:815

Parameters

ParameterType
xnumber
ynumber

Returns

void

Inherited from

UniverRenderingContext2D.moveToByPrecisionLog


putImageData()

putImageData(
   imageData, 
   dx, 
   dy): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:848

putImageData function.

Parameters

ParameterType
imageDataImageData
dxnumber
dynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.putImageData


quadraticCurveTo()

quadraticCurveTo(
   cpx, 
   cpy, 
   x, 
   y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:856

quadraticCurveTo function.

Parameters

ParameterType
cpxnumber
cpynumber
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.quadraticCurveTo


rect()

rect(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:826

rect function.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.rect


rectByPrecision()

rectByPrecision(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:834

rect function.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.rectByPrecision


reset()

reset(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:388

reset canvas context transform

Returns

void

Method

Inherited from

UniverRenderingContext2D.reset


resetTransform()

resetTransform(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:373

MDN Reference

Returns

void

Inherited from

UniverRenderingContext2D.resetTransform


restore()

restore(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:864

restore function.

Returns

void

Method

Inherited from

UniverRenderingContext2D.restore


rotate()

rotate(angle): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:872

rotate function.

Parameters

ParameterType
anglenumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.rotate


roundRect()

roundRect(
   x, 
   y, 
   w, 
   h, 
   radii?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:342

MDN Reference

Parameters

ParameterType
xnumber
ynumber
wnumber
hnumber
radii?number | DOMPointInit | (number | DOMPointInit)[]

Returns

void

Inherited from

UniverRenderingContext2D.roundRect


roundRectByPrecision()

roundRectByPrecision(
   x, 
   y, 
   w, 
   h, 
   radii?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:352

Parameters

ParameterType
xnumber
ynumber
wnumber
hnumber
radii?number | DOMPointInit | (number | DOMPointInit)[]

Returns

void

Inherited from

UniverRenderingContext2D.roundRectByPrecision


save()

save(): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:881

save function.

Returns

void

Method

Inherited from

UniverRenderingContext2D.save


scale()

scale(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:889

scale function.

Parameters

ParameterType
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.scale


setGlobalCompositeOperation()

setGlobalCompositeOperation(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:1007

Parameters

ParameterType
valGlobalCompositeOperation

Returns

void

Inherited from

UniverRenderingContext2D.setGlobalCompositeOperation


setId()

setId(id): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:45

Parameters

ParameterType
idstring

Returns

void

Inherited from

UniverRenderingContext2D.setId


setLineDash()

setLineDash(segments): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:898

setLineDash function.

Parameters

ParameterType
segmentsnumber[]

Returns

void

Method

Inherited from

UniverRenderingContext2D.setLineDash


setLineWidthByPrecision()

setLineWidthByPrecision(val): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:153

Parameters

ParameterType
valnumber

Returns

void

Inherited from

UniverRenderingContext2D.setLineWidthByPrecision


setTransform()

Call Signature

setTransform(transform?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:927

setTransform function.

Parameters
ParameterType
transform?DOMMatrix2DInit
Returns

void

Method
Inherited from

UniverRenderingContext2D.setTransform

Call Signature

setTransform(
   a, 
   b, 
   c, 
   d, 
   e, 
   f): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:929

setTransform function.

Parameters
ParameterType
anumber
bnumber
cnumber
dnumber
enumber
fnumber
Returns

void

Method
Inherited from

UniverRenderingContext2D.setTransform


stroke()

stroke(path2d?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:940

stroke function.

Parameters

ParameterType
path2d?Path2D

Returns

void

Method

Inherited from

UniverRenderingContext2D.stroke


strokeRect()

strokeRect(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:706

strokeRect function.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.strokeRect


strokeRectPrecision()

strokeRectPrecision(
   x, 
   y, 
   width, 
   height): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:714

strokeRect function precision.

Parameters

ParameterType
xnumber
ynumber
widthnumber
heightnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.strokeRectPrecision


strokeText()

strokeText(
   text, 
   x, 
   y, 
   maxWidth?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:952

strokeText function.

Parameters

ParameterType
textstring
xnumber
ynumber
maxWidth?number

Returns

void

Method

Inherited from

UniverRenderingContext2D.strokeText


strokeTextByPrecision()

strokeTextByPrecision(
   text, 
   x, 
   y, 
   maxWidth?): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:960

strokeText function precision.

Parameters

ParameterType
textstring
xnumber
ynumber
maxWidth?number

Returns

void

Method

Inherited from

UniverRenderingContext2D.strokeTextByPrecision


transform()

transform(
   a, 
   b, 
   c, 
   d, 
   e, 
   f): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:975

transform function.

Parameters

ParameterType
anumber
bnumber
cnumber
dnumber
enumber
fnumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.transform


translate()

translate(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:984

translate function.

Parameters

ParameterType
xnumber
ynumber

Returns

void

Method

Inherited from

UniverRenderingContext2D.translate


translateWithPrecision()

translateWithPrecision(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:989

Parameters

ParameterType
xnumber
ynumber

Returns

void

Inherited from

UniverRenderingContext2D.translateWithPrecision


translateWithPrecisionRatio()

translateWithPrecisionRatio(x, y): void

Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:997

Parameters

ParameterType
xnumber
ynumber

Returns

void

Inherited from

UniverRenderingContext2D.translateWithPrecisionRatio