@univerjs/engine-render v0.4.2 • Docs
Class: UniverRenderingContext2D
Extended by
Implements
CanvasRenderingContext2D
Constructors
new UniverRenderingContext2D()
new UniverRenderingContext2D(context): UniverRenderingContext2D
Parameters
Parameter | Type |
---|---|
context | CanvasRenderingContext2D |
Returns
Defined in
submodules/univer/packages/engine-render/src/context.ts:34 (opens in a new tab)
Properties
Property | Modifier | Type | Default value | Description | Defined in |
---|---|---|---|---|---|
__mode | public | string | 'rendering' | - | submodules/univer/packages/engine-render/src/context.ts:23 (opens in a new tab) |
_context | public | CanvasRenderingContext2D | undefined | - | submodules/univer/packages/engine-render/src/context.ts:28 (opens in a new tab) |
canvas | readonly | HTMLCanvasElement | undefined | MDN Reference (opens in a new tab) | submodules/univer/packages/engine-render/src/context.ts:26 (opens in a new tab) |
renderConfig | public | Readonly <IRenderConfig > | {} | - | submodules/univer/packages/engine-render/src/context.ts:32 (opens in a new tab) |
Accessors
direction
get direction(): CanvasDirection
MDN Reference (opens in a new tab)
set direction(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasDirection |
Returns
CanvasDirection
Implementation of
CanvasRenderingContext2D.direction
Defined in
submodules/univer/packages/engine-render/src/context.ts:205 (opens in a new tab)
fillStyle
get fillStyle(): string | CanvasGradient | CanvasPattern
MDN Reference (opens in a new tab)
set fillStyle(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | string | CanvasGradient | CanvasPattern |
Returns
string
| CanvasGradient
| CanvasPattern
Implementation of
CanvasRenderingContext2D.fillStyle
Defined in
submodules/univer/packages/engine-render/src/context.ts:73 (opens in a new tab)
filter
get filter(): string
MDN Reference (opens in a new tab)
set filter(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | string |
Returns
string
Implementation of
CanvasRenderingContext2D.filter
Defined in
submodules/univer/packages/engine-render/src/context.ts:91 (opens in a new tab)
font
get font(): string
MDN Reference (opens in a new tab)
set font(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | string |
Returns
string
Implementation of
CanvasRenderingContext2D.font
Defined in
submodules/univer/packages/engine-render/src/context.ts:214 (opens in a new tab)
fontKerning
get fontKerning(): CanvasFontKerning
MDN Reference (opens in a new tab)
set fontKerning(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasFontKerning |
Returns
CanvasFontKerning
Implementation of
CanvasRenderingContext2D.fontKerning
Defined in
submodules/univer/packages/engine-render/src/context.ts:223 (opens in a new tab)
fontStretch
get fontStretch(): CanvasFontStretch
MDN Reference (opens in a new tab)
set fontStretch(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasFontStretch |
Returns
CanvasFontStretch
Implementation of
CanvasRenderingContext2D.fontStretch
Defined in
submodules/univer/packages/engine-render/src/context.ts:232 (opens in a new tab)
fontVariantCaps
get fontVariantCaps(): CanvasFontVariantCaps
MDN Reference (opens in a new tab)
set fontVariantCaps(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasFontVariantCaps |
Returns
CanvasFontVariantCaps
Implementation of
CanvasRenderingContext2D.fontVariantCaps
Defined in
submodules/univer/packages/engine-render/src/context.ts:243 (opens in a new tab)
globalAlpha
get globalAlpha(): number
MDN Reference (opens in a new tab)
set globalAlpha(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | number |
Returns
number
Implementation of
CanvasRenderingContext2D.globalAlpha
Defined in
submodules/univer/packages/engine-render/src/context.ts:55 (opens in a new tab)
globalCompositeOperation
get globalCompositeOperation(): GlobalCompositeOperation
MDN Reference (opens in a new tab)
set globalCompositeOperation(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | GlobalCompositeOperation |
Returns
GlobalCompositeOperation
Implementation of
CanvasRenderingContext2D.globalCompositeOperation
Defined in
submodules/univer/packages/engine-render/src/context.ts:64 (opens in a new tab)
imageSmoothingEnabled
get imageSmoothingEnabled(): boolean
MDN Reference (opens in a new tab)
set imageSmoothingEnabled(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | boolean |
Returns
boolean
Implementation of
CanvasRenderingContext2D.imageSmoothingEnabled
Defined in
submodules/univer/packages/engine-render/src/context.ts:100 (opens in a new tab)
imageSmoothingQuality
get imageSmoothingQuality(): ImageSmoothingQuality
MDN Reference (opens in a new tab)
set imageSmoothingQuality(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | ImageSmoothingQuality |
Returns
ImageSmoothingQuality
Implementation of
CanvasRenderingContext2D.imageSmoothingQuality
Defined in
submodules/univer/packages/engine-render/src/context.ts:109 (opens in a new tab)
letterSpacing
get letterSpacing(): string
MDN Reference (opens in a new tab)
set letterSpacing(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | string |
Returns
string
Implementation of
CanvasRenderingContext2D.letterSpacing
Defined in
submodules/univer/packages/engine-render/src/context.ts:254 (opens in a new tab)
lineCap
get lineCap(): CanvasLineCap
MDN Reference (opens in a new tab)
set lineCap(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasLineCap |
Returns
CanvasLineCap
Implementation of
CanvasRenderingContext2D.lineCap
Defined in
submodules/univer/packages/engine-render/src/context.ts:118 (opens in a new tab)
lineDashOffset
get lineDashOffset(): number
MDN Reference (opens in a new tab)
set lineDashOffset(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | number |
Returns
number
Implementation of
CanvasRenderingContext2D.lineDashOffset
Defined in
submodules/univer/packages/engine-render/src/context.ts:127 (opens in a new tab)
lineJoin
get lineJoin(): CanvasLineJoin
MDN Reference (opens in a new tab)
set lineJoin(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasLineJoin |
Returns
CanvasLineJoin
Implementation of
CanvasRenderingContext2D.lineJoin
Defined in
submodules/univer/packages/engine-render/src/context.ts:136 (opens in a new tab)
lineWidth
get lineWidth(): number
MDN Reference (opens in a new tab)
set lineWidth(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | number |
Returns
number
Implementation of
CanvasRenderingContext2D.lineWidth
Defined in
submodules/univer/packages/engine-render/src/context.ts:145 (opens in a new tab)
miterLimit
get miterLimit(): number
MDN Reference (opens in a new tab)
set miterLimit(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | number |
Returns
number
Implementation of
CanvasRenderingContext2D.miterLimit
Defined in
submodules/univer/packages/engine-render/src/context.ts:160 (opens in a new tab)
shadowBlur
get shadowBlur(): number
MDN Reference (opens in a new tab)
set shadowBlur(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | number |
Returns
number
Implementation of
CanvasRenderingContext2D.shadowBlur
Defined in
submodules/univer/packages/engine-render/src/context.ts:169 (opens in a new tab)
shadowColor
get shadowColor(): string
MDN Reference (opens in a new tab)
set shadowColor(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | string |
Returns
string
Implementation of
CanvasRenderingContext2D.shadowColor
Defined in
submodules/univer/packages/engine-render/src/context.ts:178 (opens in a new tab)
shadowOffsetX
get shadowOffsetX(): number
MDN Reference (opens in a new tab)
set shadowOffsetX(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | number |
Returns
number
Implementation of
CanvasRenderingContext2D.shadowOffsetX
Defined in
submodules/univer/packages/engine-render/src/context.ts:187 (opens in a new tab)
shadowOffsetY
get shadowOffsetY(): number
MDN Reference (opens in a new tab)
set shadowOffsetY(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | number |
Returns
number
Implementation of
CanvasRenderingContext2D.shadowOffsetY
Defined in
submodules/univer/packages/engine-render/src/context.ts:196 (opens in a new tab)
strokeStyle
get strokeStyle(): string | CanvasGradient | CanvasPattern
MDN Reference (opens in a new tab)
set strokeStyle(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | string | CanvasGradient | CanvasPattern |
Returns
string
| CanvasGradient
| CanvasPattern
Implementation of
CanvasRenderingContext2D.strokeStyle
Defined in
submodules/univer/packages/engine-render/src/context.ts:82 (opens in a new tab)
textAlign
get textAlign(): CanvasTextAlign
MDN Reference (opens in a new tab)
set textAlign(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasTextAlign |
Returns
CanvasTextAlign
Implementation of
CanvasRenderingContext2D.textAlign
Defined in
submodules/univer/packages/engine-render/src/context.ts:287 (opens in a new tab)
textBaseline
get textBaseline(): CanvasTextBaseline
MDN Reference (opens in a new tab)
set textBaseline(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasTextBaseline |
Returns
CanvasTextBaseline
Implementation of
CanvasRenderingContext2D.textBaseline
Defined in
submodules/univer/packages/engine-render/src/context.ts:296 (opens in a new tab)
textRendering
get textRendering(): CanvasTextRendering
MDN Reference (opens in a new tab)
set textRendering(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | CanvasTextRendering |
Returns
CanvasTextRendering
Implementation of
CanvasRenderingContext2D.textRendering
Defined in
submodules/univer/packages/engine-render/src/context.ts:265 (opens in a new tab)
wordSpacing
get wordSpacing(): string
MDN Reference (opens in a new tab)
set wordSpacing(val): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
val | string |
Returns
string
Implementation of
CanvasRenderingContext2D.wordSpacing
Defined in
submodules/univer/packages/engine-render/src/context.ts:276 (opens in a new tab)
Methods
_getScale()
protected _getScale(): {
scaleX: number;
scaleY: number;
}
Get scale from ctx. DOMMatrix.a DOMMatrix.d would affect by ctx.rotate()
Returns
{
scaleX: number;
scaleY: number;
}
Name | Type | Defined in |
---|---|---|
scaleX | number | submodules/univer/packages/engine-render/src/context.ts:317 (opens in a new tab) |
scaleY | number | submodules/univer/packages/engine-render/src/context.ts:318 (opens in a new tab) |
Defined in
submodules/univer/packages/engine-render/src/context.ts:308 (opens in a new tab)
arc()
arc(
x,
y,
radius,
startAngle,
endAngle,
counterClockwise?): void
arc function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
radius | number |
startAngle | number |
endAngle | number |
counterClockwise ? | boolean |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.arc
Defined in
submodules/univer/packages/engine-render/src/context.ts:397 (opens in a new tab)
arcByPrecision()
arcByPrecision(
x,
y,
radius,
startAngle,
endAngle,
counterClockwise?): void
arc function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
radius | number |
startAngle | number |
endAngle | number |
counterClockwise ? | boolean |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:405 (opens in a new tab)
arcTo()
arcTo(
x1,
y1,
x2,
y2,
radius): void
arcTo function.
Parameters
Parameter | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
radius | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.arcTo
Defined in
submodules/univer/packages/engine-render/src/context.ts:418 (opens in a new tab)
arcToByPrecision()
arcToByPrecision(
x1,
y1,
x2,
y2,
radius): void
arcTo function.
Parameters
Parameter | Type |
---|---|
x1 | number |
y1 | number |
x2 | number |
y2 | number |
radius | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:427 (opens in a new tab)
beginPath()
beginPath(): void
beginPath function.
Returns
void
Method
Implementation of
CanvasRenderingContext2D.beginPath
Defined in
submodules/univer/packages/engine-render/src/context.ts:441 (opens in a new tab)
bezierCurveTo()
bezierCurveTo(
cp1x,
cp1y,
cp2x,
cp2y,
x,
y): void
bezierCurveTo function.
Parameters
Parameter | Type |
---|---|
cp1x | number |
cp1y | number |
cp2x | number |
cp2y | number |
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.bezierCurveTo
Defined in
submodules/univer/packages/engine-render/src/context.ts:449 (opens in a new tab)
bezierCurveToByPrecision()
bezierCurveToByPrecision(
cp1x,
cp1y,
cp2x,
cp2y,
x,
y): void
bezierCurveTo function precision.
Parameters
Parameter | Type |
---|---|
cp1x | number |
cp1y | number |
cp2x | number |
cp2y | number |
x | number |
y | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:457 (opens in a new tab)
clearRect()
clearRect(
x,
y,
width,
height): void
clearRect function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.clearRect
Defined in
submodules/univer/packages/engine-render/src/context.ts:473 (opens in a new tab)
clearRectByPrecision()
clearRectByPrecision(
x,
y,
width,
height): void
clearRect function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:481 (opens in a new tab)
clearRectForTexture()
clearRectForTexture(
x,
y,
width,
height): void
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:1003 (opens in a new tab)
clip()
clip(undefined)
clip(): void
clip function.
Returns
void
Method
Implementation of
CanvasRenderingContext2D.clip
Defined in
submodules/univer/packages/engine-render/src/context.ts:495 (opens in a new tab)
clip(path)
clip(path): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
path | Path2D |
Returns
void
Implementation of
CanvasRenderingContext2D.clip
Defined in
submodules/univer/packages/engine-render/src/context.ts:497 (opens in a new tab)
clip(fillRule)
clip(fillRule?): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
fillRule ? | CanvasFillRule |
Returns
void
Implementation of
CanvasRenderingContext2D.clip
Defined in
submodules/univer/packages/engine-render/src/context.ts:499 (opens in a new tab)
clip(path, fillRule)
clip(path, fillRule?): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
path | Path2D |
fillRule ? | CanvasFillRule |
Returns
void
Implementation of
CanvasRenderingContext2D.clip
Defined in
submodules/univer/packages/engine-render/src/context.ts:501 (opens in a new tab)
closePath()
closePath(): void
closePath function.
Returns
void
Method
Implementation of
CanvasRenderingContext2D.closePath
Defined in
submodules/univer/packages/engine-render/src/context.ts:511 (opens in a new tab)
closePathByEnv()
closePathByEnv(): void
Chrome hardware acceleration causes canvas stroke to fail to draw lines on Mac.
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:532 (opens in a new tab)
createConicGradient()
createConicGradient(
startAngle,
x,
y): CanvasGradient
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
startAngle | number |
x | number |
y | number |
Returns
CanvasGradient
Implementation of
CanvasRenderingContext2D.createConicGradient
Defined in
submodules/univer/packages/engine-render/src/context.ts:338 (opens in a new tab)
createImageData()
createImageData(width, height, settings)
createImageData(
width,
height,
settings?): ImageData
createImageData function.
Parameters
Parameter | Type |
---|---|
width | number |
height | number |
settings ? | ImageDataSettings |
Returns
ImageData
Method
Implementation of
CanvasRenderingContext2D.createImageData
Defined in
submodules/univer/packages/engine-render/src/context.ts:549 (opens in a new tab)
createImageData(imagedata)
createImageData(imagedata): ImageData
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
imagedata | ImageData |
Returns
ImageData
Implementation of
CanvasRenderingContext2D.createImageData
Defined in
submodules/univer/packages/engine-render/src/context.ts:551 (opens in a new tab)
createLinearGradient()
createLinearGradient(
x0,
y0,
x1,
y1): CanvasGradient
createLinearGradient function.
Parameters
Parameter | Type |
---|---|
x0 | number |
y0 | number |
x1 | number |
y1 | number |
Returns
CanvasGradient
Method
Implementation of
CanvasRenderingContext2D.createLinearGradient
Defined in
submodules/univer/packages/engine-render/src/context.ts:570 (opens in a new tab)
createPattern()
createPattern(image, repetition): null | CanvasPattern
createPattern function.
Parameters
Parameter | Type |
---|---|
image | CanvasImageSource |
repetition | null | string |
Returns
null
| CanvasPattern
Method
Implementation of
CanvasRenderingContext2D.createPattern
Defined in
submodules/univer/packages/engine-render/src/context.ts:578 (opens in a new tab)
createRadialGradient()
createRadialGradient(
x0,
y0,
r0,
x1,
y1,
r1): CanvasGradient
createRadialGradient function.
Parameters
Parameter | Type |
---|---|
x0 | number |
y0 | number |
r0 | number |
x1 | number |
y1 | number |
r1 | number |
Returns
CanvasGradient
Method
Implementation of
CanvasRenderingContext2D.createRadialGradient
Defined in
submodules/univer/packages/engine-render/src/context.ts:586 (opens in a new tab)
drawFocusIfNeeded()
drawFocusIfNeeded(element)
drawFocusIfNeeded(element): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
element | Element |
Returns
void
Implementation of
CanvasRenderingContext2D.drawFocusIfNeeded
Defined in
submodules/univer/packages/engine-render/src/context.ts:378 (opens in a new tab)
drawFocusIfNeeded(path, element)
drawFocusIfNeeded(path, element): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
path | Path2D |
element | Element |
Returns
void
Implementation of
CanvasRenderingContext2D.drawFocusIfNeeded
Defined in
submodules/univer/packages/engine-render/src/context.ts:379 (opens in a new tab)
drawImage()
drawImage(
image,
sx,
sy,
sWidth?,
sHeight?,
dx?,
dy?,
dWidth?,
dHeight?): void
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
Defined in
submodules/univer/packages/engine-render/src/context.ts:594 (opens in a new tab)
ellipse()
ellipse(
x,
y,
radiusX,
radiusY,
rotation,
startAngle,
endAngle,
counterclockwise?): void
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
Defined in
submodules/univer/packages/engine-render/src/context.ts:634 (opens in a new tab)
fill()
fill(fillRule)
fill(fillRule?): void
fill function.
Parameters
Parameter | Type |
---|---|
fillRule ? | CanvasFillRule |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.fill
Defined in
submodules/univer/packages/engine-render/src/context.ts:670 (opens in a new tab)
fill(path, fillRule)
fill(path, fillRule?): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
path | Path2D |
fillRule ? | CanvasFillRule |
Returns
void
Implementation of
CanvasRenderingContext2D.fill
Defined in
submodules/univer/packages/engine-render/src/context.ts:672 (opens in a new tab)
fillRect()
fillRect(
x,
y,
width,
height): void
fillRect function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.fillRect
Defined in
submodules/univer/packages/engine-render/src/context.ts:684 (opens in a new tab)
fillRectByPrecision()
fillRectByPrecision(
x,
y,
width,
height): void
fillRect function precision.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:692 (opens in a new tab)
fillText()
fillText(
text,
x,
y,
maxWidth?): void
fillText function.
Parameters
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.fillText
Defined in
submodules/univer/packages/engine-render/src/context.ts:728 (opens in a new tab)
fillTextPrecision()
fillTextPrecision(
text,
x,
y,
maxWidth?): void
fillText function.
Parameters
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:746 (opens in a new tab)
getBrowserType()
getBrowserType(): string
Returns
string
Defined in
submodules/univer/packages/engine-render/src/context.ts:522 (opens in a new tab)
getContextAttributes()
getContextAttributes(): CanvasRenderingContext2DSettings
MDN Reference (opens in a new tab)
Returns
CanvasRenderingContext2DSettings
Implementation of
CanvasRenderingContext2D.getContextAttributes
Defined in
submodules/univer/packages/engine-render/src/context.ts:326 (opens in a new tab)
getId()
getId(): string
Returns
string
Defined in
submodules/univer/packages/engine-render/src/context.ts:41 (opens in a new tab)
getImageData()
getImageData(
sx,
sy,
sw,
sh): ImageData
getImageData function.
Parameters
Parameter | Type |
---|---|
sx | number |
sy | number |
sw | number |
sh | number |
Returns
ImageData
Method
Implementation of
CanvasRenderingContext2D.getImageData
Defined in
submodules/univer/packages/engine-render/src/context.ts:772 (opens in a new tab)
getLineDash()
getLineDash(): number[]
getLineDash function.
Returns
number
[]
Method
Implementation of
CanvasRenderingContext2D.getLineDash
Defined in
submodules/univer/packages/engine-render/src/context.ts:919 (opens in a new tab)
getScale()
getScale(): {
scaleX: number;
scaleY: number;
}
Returns
{
scaleX: number;
scaleY: number;
}
Name | Type | Defined in |
---|---|---|
scaleX | number | submodules/univer/packages/engine-render/src/context.ts:317 (opens in a new tab) |
scaleY | number | submodules/univer/packages/engine-render/src/context.ts:318 (opens in a new tab) |
Defined in
submodules/univer/packages/engine-render/src/context.ts:322 (opens in a new tab)
getSystemType()
getSystemType(): string
Returns
string
Defined in
submodules/univer/packages/engine-render/src/context.ts:515 (opens in a new tab)
getTransform()
getTransform(): DOMMatrix
MDN Reference (opens in a new tab)
Returns
DOMMatrix
Implementation of
CanvasRenderingContext2D.getTransform
Defined in
submodules/univer/packages/engine-render/src/context.ts:368 (opens in a new tab)
isContextLost()
isContextLost(): boolean
Returns
boolean
Defined in
submodules/univer/packages/engine-render/src/context.ts:49 (opens in a new tab)
isPointInPath()
isPointInPath(x, y, fillRule)
isPointInPath(
x,
y,
fillRule?): boolean
isPointInPath function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
fillRule ? | CanvasFillRule |
Returns
boolean
Method
Implementation of
CanvasRenderingContext2D.isPointInPath
Defined in
submodules/univer/packages/engine-render/src/context.ts:658 (opens in a new tab)
isPointInPath(path, x, y, fillRule)
isPointInPath(
path,
x,
y,
fillRule?): boolean
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
path | Path2D |
x | number |
y | number |
fillRule ? | CanvasFillRule |
Returns
boolean
Implementation of
CanvasRenderingContext2D.isPointInPath
Defined in
submodules/univer/packages/engine-render/src/context.ts:660 (opens in a new tab)
isPointInStroke()
isPointInStroke(x, y)
isPointInStroke(x, y): boolean
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
boolean
Implementation of
CanvasRenderingContext2D.isPointInStroke
Defined in
submodules/univer/packages/engine-render/src/context.ts:330 (opens in a new tab)
isPointInStroke(path, x, y)
isPointInStroke(
path,
x,
y): boolean
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
path | Path2D |
x | number |
y | number |
Returns
boolean
Implementation of
CanvasRenderingContext2D.isPointInStroke
Defined in
submodules/univer/packages/engine-render/src/context.ts:332 (opens in a new tab)
lineTo()
lineTo(x, y): void
lineTo function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.lineTo
Defined in
submodules/univer/packages/engine-render/src/context.ts:780 (opens in a new tab)
lineToByPrecision()
lineToByPrecision(x, y): void
lineTo function precision.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:788 (opens in a new tab)
measureText()
measureText(text): TextMetrics
measureText function.
Parameters
Parameter | Type |
---|---|
text | string |
Returns
TextMetrics
Method
Implementation of
CanvasRenderingContext2D.measureText
Defined in
submodules/univer/packages/engine-render/src/context.ts:764 (opens in a new tab)
moveTo()
moveTo(x, y): void
moveTo function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.moveTo
Defined in
submodules/univer/packages/engine-render/src/context.ts:800 (opens in a new tab)
moveToByPrecision()
moveToByPrecision(x, y): void
moveTo function precision.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:808 (opens in a new tab)
moveToByPrecisionLog()
moveToByPrecisionLog(x, y): void
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:815 (opens in a new tab)
putImageData()
putImageData(
imageData,
dx,
dy): void
putImageData function.
Parameters
Parameter | Type |
---|---|
imageData | ImageData |
dx | number |
dy | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.putImageData
Defined in
submodules/univer/packages/engine-render/src/context.ts:848 (opens in a new tab)
quadraticCurveTo()
quadraticCurveTo(
cpx,
cpy,
x,
y): void
quadraticCurveTo function.
Parameters
Parameter | Type |
---|---|
cpx | number |
cpy | number |
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.quadraticCurveTo
Defined in
submodules/univer/packages/engine-render/src/context.ts:856 (opens in a new tab)
rect()
rect(
x,
y,
width,
height): void
rect function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.rect
Defined in
submodules/univer/packages/engine-render/src/context.ts:826 (opens in a new tab)
rectByPrecision()
rectByPrecision(
x,
y,
width,
height): void
rect function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:834 (opens in a new tab)
reset()
reset(): void
reset canvas context transform
Returns
void
Method
Implementation of
CanvasRenderingContext2D.reset
Defined in
submodules/univer/packages/engine-render/src/context.ts:388 (opens in a new tab)
resetTransform()
resetTransform(): void
MDN Reference (opens in a new tab)
Returns
void
Implementation of
CanvasRenderingContext2D.resetTransform
Defined in
submodules/univer/packages/engine-render/src/context.ts:373 (opens in a new tab)
restore()
restore(): void
restore function.
Returns
void
Method
Implementation of
CanvasRenderingContext2D.restore
Defined in
submodules/univer/packages/engine-render/src/context.ts:864 (opens in a new tab)
rotate()
rotate(angle): void
rotate function.
Parameters
Parameter | Type |
---|---|
angle | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.rotate
Defined in
submodules/univer/packages/engine-render/src/context.ts:872 (opens in a new tab)
roundRect()
roundRect(
x,
y,
w,
h,
radii?): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
w | number |
h | number |
radii ? | number | DOMPointInit | (number | DOMPointInit )[] |
Returns
void
Implementation of
CanvasRenderingContext2D.roundRect
Defined in
submodules/univer/packages/engine-render/src/context.ts:342 (opens in a new tab)
roundRectByPrecision()
roundRectByPrecision(
x,
y,
w,
h,
radii?): void
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
w | number |
h | number |
radii ? | number | DOMPointInit | (number | DOMPointInit )[] |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:352 (opens in a new tab)
save()
save(): void
save function.
Returns
void
Method
Implementation of
CanvasRenderingContext2D.save
Defined in
submodules/univer/packages/engine-render/src/context.ts:881 (opens in a new tab)
scale()
scale(x, y): void
scale function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.scale
Defined in
submodules/univer/packages/engine-render/src/context.ts:889 (opens in a new tab)
setGlobalCompositeOperation()
setGlobalCompositeOperation(val): void
Parameters
Parameter | Type |
---|---|
val | GlobalCompositeOperation |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:1007 (opens in a new tab)
setId()
setId(id): void
Parameters
Parameter | Type |
---|---|
id | string |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:45 (opens in a new tab)
setLineDash()
setLineDash(segments): void
setLineDash function.
Parameters
Parameter | Type |
---|---|
segments | number [] |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.setLineDash
Defined in
submodules/univer/packages/engine-render/src/context.ts:898 (opens in a new tab)
setLineWidthByPrecision()
setLineWidthByPrecision(val): void
Parameters
Parameter | Type |
---|---|
val | number |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:153 (opens in a new tab)
setTransform()
setTransform(transform)
setTransform(transform?): void
setTransform function.
Parameters
Parameter | Type |
---|---|
transform ? | DOMMatrix2DInit |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.setTransform
Defined in
submodules/univer/packages/engine-render/src/context.ts:927 (opens in a new tab)
setTransform(a, b, c, d, e, f)
setTransform(
a,
b,
c,
d,
e,
f): void
MDN Reference (opens in a new tab)
Parameters
Parameter | Type |
---|---|
a | number |
b | number |
c | number |
d | number |
e | number |
f | number |
Returns
void
Implementation of
CanvasRenderingContext2D.setTransform
Defined in
submodules/univer/packages/engine-render/src/context.ts:929 (opens in a new tab)
stroke()
stroke(path2d?): void
stroke function.
Parameters
Parameter | Type |
---|---|
path2d ? | Path2D |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.stroke
Defined in
submodules/univer/packages/engine-render/src/context.ts:940 (opens in a new tab)
strokeRect()
strokeRect(
x,
y,
width,
height): void
strokeRect function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.strokeRect
Defined in
submodules/univer/packages/engine-render/src/context.ts:706 (opens in a new tab)
strokeRectPrecision()
strokeRectPrecision(
x,
y,
width,
height): void
strokeRect function precision.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
width | number |
height | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:714 (opens in a new tab)
strokeText()
strokeText(
text,
x,
y,
maxWidth?): void
strokeText function.
Parameters
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.strokeText
Defined in
submodules/univer/packages/engine-render/src/context.ts:952 (opens in a new tab)
strokeTextByPrecision()
strokeTextByPrecision(
text,
x,
y,
maxWidth?): void
strokeText function precision.
Parameters
Parameter | Type |
---|---|
text | string |
x | number |
y | number |
maxWidth ? | number |
Returns
void
Method
Defined in
submodules/univer/packages/engine-render/src/context.ts:960 (opens in a new tab)
transform()
transform(
a,
b,
c,
d,
e,
f): void
transform function.
Parameters
Parameter | Type |
---|---|
a | number |
b | number |
c | number |
d | number |
e | number |
f | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.transform
Defined in
submodules/univer/packages/engine-render/src/context.ts:975 (opens in a new tab)
translate()
translate(x, y): void
translate function.
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Method
Implementation of
CanvasRenderingContext2D.translate
Defined in
submodules/univer/packages/engine-render/src/context.ts:984 (opens in a new tab)
translateWithPrecision()
translateWithPrecision(x, y): void
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:989 (opens in a new tab)
translateWithPrecisionRatio()
translateWithPrecisionRatio(x, y): void
Parameters
Parameter | Type |
---|---|
x | number |
y | number |
Returns
void
Defined in
submodules/univer/packages/engine-render/src/context.ts:997 (opens in a new tab)