interface IRenderer { beginPath(): void; clearRect(x,
y,
width,
height): void; closePath(): void; destroy(): void; drawImage(image,
x,
y,
width?,
height?): void; drawVideo(enableLegacyPip): void; fillRect(x,
y,
width,
height): void; fillText(text,
x,
y): void; getCanvas(): IRenderer; getFillStyle(): string | CanvasGradient | CanvasPattern; getFont(): string; getSize(): { height: number; width: number; }; lineTo(x,
y): void; measureText(text): TextMetrics; moveTo(x,
y): void; quadraticCurveTo(cpx,
cpy,
x,
y): void; restore(): void; save(): void; setFillStyle(color): void; setFont(font): void; setGlobalAlpha(alpha): void; setLineWidth(width): void; setScale(scale,
arg1?): void; setSize(width,
height): void; setStrokeStyle(color): void; stroke(): void; strokeRect(x,
y,
width,
height): void; strokeText(text,
x,
y): void; } Methods
beginPath
- beginPath(): void
Returns void
clearRect
- clearRect(x, y, width, height): void
Parameters
- x: number
- y: number
- width: number
- height: number
Returns void
closePath
- closePath(): void
Returns void
destroy
- destroy(): void
Returns void
drawImage
- drawImage(image, x, y, width?, height?): void
Parameters
- image: IRenderer
- x: number
- y: number
Optional
width: numberOptional
height: number
Returns void
drawVideo
- drawVideo(enableLegacyPip): void
Returns void
fillRect
- fillRect(x, y, width, height): void
Parameters
- x: number
- y: number
- width: number
- height: number
Returns void
fillText
- fillText(text, x, y): void
Parameters
- text: string
- x: number
- y: number
Returns void
getFillStyle
- getFillStyle(): string | CanvasGradient | CanvasPattern
Returns string | CanvasGradient | CanvasPattern
getFont
- getFont(): string
Returns string
getSize
- getSize(): {
height: number;
width: number;
} Returns {
height: number;
width: number;
}
height: number
width: number
lineTo
- lineTo(x, y): void
Returns void
measureText
- measureText(text): TextMetrics
Returns TextMetrics
moveTo
- moveTo(x, y): void
Returns void
quadraticCurveTo
- quadraticCurveTo(cpx, cpy, x, y): void
Parameters
- cpx: number
- cpy: number
- x: number
- y: number
Returns void
restore
- restore(): void
Returns void
setFillStyle
- setFillStyle(color): void
Returns void
setFont
- setFont(font): void
Returns void
setGlobalAlpha
- setGlobalAlpha(alpha): void
Returns void
setLineWidth
- setLineWidth(width): void
Returns void
setScale
- setScale(scale, arg1?): void
Parameters
- scale: number
Optional
arg1: number
Returns void
setSize
- setSize(width, height): void
Parameters
- width: number
- height: number
Returns void
setStrokeStyle
- setStrokeStyle(color): void
Returns void
stroke
- stroke(): void
Returns void
strokeRect
- strokeRect(x, y, width, height): void
Parameters
- x: number
- y: number
- width: number
- height: number
Returns void
strokeText
- strokeText(text, x, y): void
Parameters
- text: string
- x: number
- y: number
Returns void