@univerjs/engine-render v0.5.4
Class: UniverRenderingContext2D
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:22
Extended by
Implements
CanvasRenderingContext2D
Constructors
new UniverRenderingContext2D()
new UniverRenderingContext2D(context): UniverRenderingContext2D
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:34
Parameters
Parameter | Type |
---|---|
context | CanvasRenderingContext2D |
Returns
Properties
Property | Modifier | Type | Default value | Description | Defined in |
---|---|---|---|---|---|
__mode | public | string | 'rendering' | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:23 |
_context | public | CanvasRenderingContext2D | undefined | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:28 |
canvas | readonly | HTMLCanvasElement | undefined | MDN Reference | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:26 |
renderConfig | public | Readonly <IRenderConfig > | {} | - | packages/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
Returns
CanvasDirection
Set Signature
set direction(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:209
Parameters
Parameter | Type |
---|---|
val | CanvasDirection |
Returns
void
Implementation of
CanvasRenderingContext2D.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
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
Parameters
Parameter | Type |
---|---|
val | string | CanvasGradient | CanvasPattern |
Returns
void
Implementation of
CanvasRenderingContext2D.fillStyle
filter
Get Signature
get filter(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:91
Returns
string
Set Signature
set filter(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:95
Parameters
Parameter | Type |
---|---|
val | string |
Returns
void
Implementation of
CanvasRenderingContext2D.filter
font
Get Signature
get font(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:214
Returns
string
Set Signature
set font(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:218
Parameters
Parameter | Type |
---|---|
val | string |
Returns
void
Implementation of
CanvasRenderingContext2D.font
fontKerning
Get Signature
get fontKerning(): CanvasFontKerning
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:223
Returns
CanvasFontKerning
Set Signature
set fontKerning(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:227
Parameters
Parameter | Type |
---|---|
val | CanvasFontKerning |
Returns
void
Implementation of
CanvasRenderingContext2D.fontKerning
fontStretch
Get Signature
get fontStretch(): CanvasFontStretch
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:232
Returns
CanvasFontStretch
Set Signature
set fontStretch(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:237
Parameters
Parameter | Type |
---|---|
val | CanvasFontStretch |
Returns
void
Implementation of
CanvasRenderingContext2D.fontStretch
fontVariantCaps
Get Signature
get fontVariantCaps(): CanvasFontVariantCaps
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:243
Returns
CanvasFontVariantCaps
Set Signature
set fontVariantCaps(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:248
Parameters
Parameter | Type |
---|---|
val | CanvasFontVariantCaps |
Returns
void
Implementation of
CanvasRenderingContext2D.fontVariantCaps
globalAlpha
Get Signature
get globalAlpha(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:55
Returns
number
Set Signature
set globalAlpha(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:59
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Implementation of
CanvasRenderingContext2D.globalAlpha
globalCompositeOperation
Get Signature
get globalCompositeOperation(): GlobalCompositeOperation
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:64
Returns
GlobalCompositeOperation
Set Signature
set globalCompositeOperation(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:68
Parameters
Parameter | Type |
---|---|
val | GlobalCompositeOperation |
Returns
void
Implementation of
CanvasRenderingContext2D.globalCompositeOperation
imageSmoothingEnabled
Get Signature
get imageSmoothingEnabled(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:100
Returns
boolean
Set Signature
set imageSmoothingEnabled(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:104
Parameters
Parameter | Type |
---|---|
val | boolean |
Returns
void
Implementation of
CanvasRenderingContext2D.imageSmoothingEnabled
imageSmoothingQuality
Get Signature
get imageSmoothingQuality(): ImageSmoothingQuality
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:109
Returns
ImageSmoothingQuality
Set Signature
set imageSmoothingQuality(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:113
Parameters
Parameter | Type |
---|---|
val | ImageSmoothingQuality |
Returns
void
Implementation of
CanvasRenderingContext2D.imageSmoothingQuality
letterSpacing
Get Signature
get letterSpacing(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:254
Returns
string
Set Signature
set letterSpacing(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:259
Parameters
Parameter | Type |
---|---|
val | string |
Returns
void
Implementation of
CanvasRenderingContext2D.letterSpacing
lineCap
Get Signature
get lineCap(): CanvasLineCap
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:118
Returns
CanvasLineCap
Set Signature
set lineCap(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:122
Parameters
Parameter | Type |
---|---|
val | CanvasLineCap |
Returns
void
Implementation of
CanvasRenderingContext2D.lineCap
lineDashOffset
Get Signature
get lineDashOffset(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:127
Returns
number
Set Signature
set lineDashOffset(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:131
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Implementation of
CanvasRenderingContext2D.lineDashOffset
lineJoin
Get Signature
get lineJoin(): CanvasLineJoin
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:136
Returns
CanvasLineJoin
Set Signature
set lineJoin(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:140
Parameters
Parameter | Type |
---|---|
val | CanvasLineJoin |
Returns
void
Implementation of
CanvasRenderingContext2D.lineJoin
lineWidth
Get Signature
get lineWidth(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:145
Returns
number
Set Signature
set lineWidth(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:149
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Implementation of
CanvasRenderingContext2D.lineWidth
miterLimit
Get Signature
get miterLimit(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:160
Returns
number
Set Signature
set miterLimit(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:164
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Implementation of
CanvasRenderingContext2D.miterLimit
shadowBlur
Get Signature
get shadowBlur(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:169
Returns
number
Set Signature
set shadowBlur(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:173
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Implementation of
CanvasRenderingContext2D.shadowBlur
shadowColor
Get Signature
get shadowColor(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:178
Returns
string
Set Signature
set shadowColor(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:182
Parameters
Parameter | Type |
---|---|
val | string |
Returns
void
Implementation of
CanvasRenderingContext2D.shadowColor
shadowOffsetX
Get Signature
get shadowOffsetX(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:187
Returns
number
Set Signature
set shadowOffsetX(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:191
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Implementation of
CanvasRenderingContext2D.shadowOffsetX
shadowOffsetY
Get Signature
get shadowOffsetY(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:196
Returns
number
Set Signature
set shadowOffsetY(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:200
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Implementation of
CanvasRenderingContext2D.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
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
Parameters
Parameter | Type |
---|---|
val | string | CanvasGradient | CanvasPattern |
Returns
void
Implementation of
CanvasRenderingContext2D.strokeStyle
textAlign
Get Signature
get textAlign(): CanvasTextAlign
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:287
Returns
CanvasTextAlign
Set Signature
set textAlign(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:291
Parameters
Parameter | Type |
---|---|
val | CanvasTextAlign |
Returns
void
Implementation of
CanvasRenderingContext2D.textAlign
textBaseline
Get Signature
get textBaseline(): CanvasTextBaseline
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:296
Returns
CanvasTextBaseline
Set Signature
set textBaseline(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:300
Parameters
Parameter | Type |
---|---|
val | CanvasTextBaseline |
Returns
void
Implementation of
CanvasRenderingContext2D.textBaseline
textRendering
Get Signature
get textRendering(): CanvasTextRendering
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:265
Returns
CanvasTextRendering
Set Signature
set textRendering(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:270
Parameters
Parameter | Type |
---|---|
val | CanvasTextRendering |
Returns
void
Implementation of
CanvasRenderingContext2D.textRendering
wordSpacing
Get Signature
get wordSpacing(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:276
Returns
string
Set Signature
set wordSpacing(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:281
Parameters
Parameter | Type |
---|---|
val | string |
Returns
void
Implementation of
CanvasRenderingContext2D.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;
}
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
Parameter | Type |
---|---|
x | number |
y | number |
radius | number |
startAngle | number |
endAngle | number |
counterClockwise ? | boolean |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
radius | number |
startAngle | number |
endAngle | number |
counterClockwise ? | boolean |
Returns
void
Method
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
Parameter | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
radius | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
radius | number |
Returns
void
Method
beginPath()
beginPath(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:441
beginPath function.
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
cp1x | number |
cp1y | number |
cp2x | number |
cp2y | number |
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
cp1x | number |
cp1y | number |
cp2x | number |
cp2y | number |
x | number |
y | number |
Returns
void
Method
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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
clearRectForTexture()
clearRectForTexture(
x,
y,
width,
height): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:1003
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
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
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
path | Path2D |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.clip
Call Signature
clip(fillRule?): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:499
Parameters
Parameter | Type |
---|---|
fillRule ? | CanvasFillRule |
Returns
void
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
path | Path2D |
fillRule ? | CanvasFillRule |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Implementation of
CanvasRenderingContext2D.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
createConicGradient()
createConicGradient(
startAngle,
x,
y): CanvasGradient
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:338
Parameters
Parameter | Type |
---|---|
startAngle | number |
x | number |
y | number |
Returns
CanvasGradient
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
width | number |
height | number |
settings ? | ImageDataSettings |
Returns
ImageData
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
imagedata | ImageData |
Returns
ImageData
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x0 | number |
y0 | number |
x1 | number |
y1 | number |
Returns
CanvasGradient
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
image | CanvasImageSource |
repetition | null | string |
Returns
null
| CanvasPattern
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x0 | number |
y0 | number |
r0 | number |
x1 | number |
y1 | number |
r1 | number |
Returns
CanvasGradient
Method
Implementation of
CanvasRenderingContext2D.createRadialGradient
drawFocusIfNeeded()
Call Signature
drawFocusIfNeeded(element): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:378
Parameters
Parameter | Type |
---|---|
element | Element |
Returns
void
Implementation of
CanvasRenderingContext2D.drawFocusIfNeeded
Call Signature
drawFocusIfNeeded(path, element): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:379
Parameters
Parameter | Type |
---|---|
path | Path2D |
element | Element |
Returns
void
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
image | CanvasImageSource |
sx | number |
sy | number |
sWidth ? | number |
sHeight ? | number |
dx ? | number |
dy ? | number |
dWidth ? | number |
dHeight ? | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
radiusX | number |
radiusY | number |
rotation | number |
startAngle | number |
endAngle | number |
counterclockwise ? | boolean |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
fillRule ? | CanvasFillRule |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
path | Path2D |
fillRule ? | CanvasFillRule |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
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
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
getBrowserType()
getBrowserType(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:522
Returns
string
getContextAttributes()
getContextAttributes(): CanvasRenderingContext2DSettings
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:326
Returns
CanvasRenderingContext2DSettings
Implementation of
CanvasRenderingContext2D.getContextAttributes
getId()
getId(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:41
Returns
string
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
Parameter | Type |
---|---|
sx | number |
sy | number |
sw | number |
sh | number |
Returns
ImageData
Method
Implementation of
CanvasRenderingContext2D.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
Implementation of
CanvasRenderingContext2D.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;
}
getSystemType()
getSystemType(): string
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:515
Returns
string
getTransform()
getTransform(): DOMMatrix
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:368
Returns
DOMMatrix
Implementation of
CanvasRenderingContext2D.getTransform
isContextLost()
isContextLost(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:49
Returns
boolean
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
fillRule ? | CanvasFillRule |
Returns
boolean
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
path | Path2D |
x | number |
y | number |
fillRule ? | CanvasFillRule |
Returns
boolean
Method
Implementation of
CanvasRenderingContext2D.isPointInPath
isPointInStroke()
Call Signature
isPointInStroke(x, y): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:330
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
boolean
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
path | Path2D |
x | number |
y | number |
Returns
boolean
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
measureText()
measureText(text): TextMetrics
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:764
measureText function.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
TextMetrics
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
moveToByPrecisionLog()
moveToByPrecisionLog(x, y): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:815
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
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
Parameter | Type |
---|---|
imageData | ImageData |
dx | number |
dy | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
cpx | number |
cpy | number |
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
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
Implementation of
CanvasRenderingContext2D.reset
resetTransform()
resetTransform(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:373
Returns
void
Implementation of
CanvasRenderingContext2D.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
Implementation of
CanvasRenderingContext2D.restore
rotate()
rotate(angle): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:872
rotate function.
Parameters
Parameter | Type |
---|---|
angle | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
w | number |
h | number |
radii ? | number | DOMPointInit | (number | DOMPointInit )[] |
Returns
void
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
w | number |
h | number |
radii ? | number | DOMPointInit | (number | DOMPointInit )[] |
Returns
void
save()
save(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:881
save function.
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.scale
setGlobalCompositeOperation()
setGlobalCompositeOperation(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:1007
Parameters
Parameter | Type |
---|---|
val | GlobalCompositeOperation |
Returns
void
setId()
setId(id): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:45
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
setLineDash()
setLineDash(segments): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:898
setLineDash function.
Parameters
Parameter | Type |
---|---|
segments | number [] |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.setLineDash
setLineWidthByPrecision()
setLineWidthByPrecision(val): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:153
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
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
Parameter | Type |
---|---|
transform ? | DOMMatrix2DInit |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
a | number |
b | number |
c | number |
d | number |
e | number |
f | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.setTransform
stroke()
stroke(path2d?): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:940
stroke function.
Parameters
Parameter | Type |
---|---|
path2d ? | Path2D |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
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
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
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
Parameter | Type |
---|---|
a | number |
b | number |
c | number |
d | number |
e | number |
f | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.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
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.translate
translateWithPrecision()
translateWithPrecision(x, y): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:989
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
translateWithPrecisionRatio()
translateWithPrecisionRatio(x, y): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/context.ts:997
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void