class CanvasDrawer
implements Drawer
new
CanvasDrawer(context: CanvasRenderingContext2D)
readonly
context: CanvasRenderingContext2D
writeonly
fillStyle: ColorType | CanvasGradient
writeonly
strokeStyle: ColorType
addPointToLine(): void
drawInClearTransform(callback: (drawer: CanvasDrawer) => unknown): void
drawInOffsetTransform(): void
drawPathWithOffsetAndMultiplier(points: readonly ReadonlySimpleVector2[],fillColor?: ColorType,strokeColor?: ColorType,offset?: ReadonlySimpleVector2,multiplier?: number,strokeWidth?: number,close?: boolean,): void
Fill path if fillColor is provided and stroke if strokeColor and strokeWidth are provided
drawSimpleTexts(texts: readonly string[],x: number,y: number,textOptions: Omit<TextOptionsInterface, "horizontalAlign" | "verticalAlign">,): void
drawTextSimple(text: string,x: number,y: number,textOptions: Omit<TextOptionsInterface, "horizontalAlign" | "verticalAlign">,): void
fillPathWithOffset(): void
fillPolygon(): void
fillVerticalText(): void
horizontalLine(): void
horizontalLines(): void
startDrawingLine(): void
strokeGrid(blocks: ReadonlySimpleVector2,blockSize: SizeType,color?: ColorType,width?: number,offset?: ReadonlySimpleVector2,): void
strokeLine(): this
strokePath(): void
strokePathWithOffset(points: readonly ReadonlySimpleVector2[],color?: ColorType,offset?: ReadonlySimpleVector2,width?,close?: boolean,): void
strokePolygon(): void
strokePolyline(): this
strokeRectVec(): void
verticalLine(): void
verticalLines(): void
createFromSize(size: number): CanvasDrawer
fromCanvas(canvas: HTMLCanvasElement,size?: ReadonlySimpleVector2,): CanvasDrawer