import { CanvasRenderingContext2D } from "https://deno.land/x/skia_canvas@0.5.8/mod.ts";
Constructors
new
CanvasRenderingContext2D(canvas: Canvas, ptr: Deno.PointerValue)Properties
_unsafePointer: Deno.PointerValue
readonly
canvas: Canvasdirection: TextDirection
fillStyle: Style
fontKerning: FontKerning
fontStretch: FontStretch
writeonly
fontVariant: FontVariantCapsreadonly
fontVariantCaps: FontVariantCapsglobalCompositeOperation: GlobalCompositeOperation
imageSmoothingQuality: ImageSmoothingQuality
lineCap: LineCap
lineJoin: LineJoin
strokeStyle: Style
textAlign: TextAlign
textBaseline: TextBaseline
textRendering: TextRendering
[_canvas]: Canvas
[_fillStyle]: Style
[_fontStretch]: FontStretch
[_fontVariantCaps]: FontVariantCaps
[_ptr]: Deno.PointerValue
[_strokeStyle]: Style
Methods
arc()
x: number,
y: number,
radius: number,
startAngle: number,
endAngle: number,
anticlockwise: boolean,
arcTo()
x1: number,
y1: number,
x2: number,
y2: number,
radius: number,
bezierCurveTo()
cp1x: number,
cp1y: number,
cp2x: number,
cp2y: number,
x: number,
y: number,
clearRect()
x: number,
y: number,
width: number,
height: number,
clip(): void
createConicGradient(): CanvasGradient
r: number,
x: number,
y: number,
createImageData(sw: number, sh: number): ImageData
createImageData(imagedata: ImageData): ImageData
createLinearGradient(): CanvasGradient
x0: number,
y0: number,
x1: number,
y1: number,
createPattern(image: CanvasPatternImage, repetition?: CanvasPatternRepeat): CanvasPattern
createRadialGradient(): CanvasGradient
x0: number,
y0: number,
r0: number,
x1: number,
y1: number,
r1: number,
drawImage(): void
drawImage(): void
drawImage(): void
image: CanvasImageSource,
sx: number,
sy: number,
sw: number,
sh: number,
dx: number,
dy: number,
dw: number,
dh: number,
ellipse()
x: number,
y: number,
radiusX: number,
radiusY: number,
rotation: number,
startAngle: number,
endAngle: number,
anticlockwise: boolean,
fill(): void
fillRect()
x: number,
y: number,
width: number,
height: number,
fillText()
text: string,
x: number,
y: number,
maxWidth?: number,
getContextAttributes(): { alpha: boolean; desynchronized: boolean; }
getImageData(): ImageData
sx: number,
sy: number,
sw: number,
sh: number,
getLineDash(): number[]
isContextLost(): boolean
isPointInPath(): boolean
isPointInPath(): boolean
isPointInStroke(x: number, y: number): boolean
isPointInStroke(): boolean
lineTo(x: number, y: number)
measureText(text: string): TextMetrics
moveTo(x: number, y: number)
putImageData()
imagedata: ImageData,
dx: number,
dy: number,
dirtyX?: number,
dirtyY?: number,
dirtyWidth?: number,
dirtyHeight?: number,
quadraticCurveTo()
cpx: number,
cpy: number,
x: number,
y: number,
rect()
x: number,
y: number,
width: number,
height: number,
reset()
restore()
rotate(angle: number)
save()
scale(x: number, y: number)
setLineDash(value: number[])
setTransform(): void
a: number,
b: number,
c: number,
d: number,
e: number,
f: number,
setTransform(matrix: DOMMatrix): void
strokeRect()
x: number,
y: number,
width: number,
height: number,
strokeText()
text: string,
x: number,
y: number,
maxWidth?: number,
transform()
a: number,
b: number,
c: number,
d: number,
e: number,
f: number,
translate(x: number, y: number)