### Hierarchy

- CanvasState
- CanvasTransform
- CanvasCompositing
- CanvasImageSmoothing
- CanvasFillStrokeStyles
- CanvasShadowStyles
- CanvasFilters
- CanvasRect
- CanvasDrawPath
- CanvasUserInterface
- CanvasText
- CanvasDrawImage
- CanvasImageData
- CanvasPathDrawingStyles
- CanvasTextDrawingStyles
- CanvasPath
  - CanvasRenderingContext2D

## Index

### Properties

- canvas
- direction
- fillStyle
- filter
- font
- globalAlpha
- globalCompositeOperation
- imageSmoothingEnabled
- imageSmoothingQuality
- lineCap
- lineDashOffset
- lineJoin
- lineWidth
- miterLimit
- shadowBlur
- shadowColor
- shadowOffsetX
- shadowOffsetY
- strokeStyle
- textAlign
- textBaseline

### Methods

- arc
- arcTo
- beginPath
- bezierCurveTo
- clearRect
- clip
- closePath
- createImageData
- createLinearGradient
- createPattern
- createRadialGradient
- drawFocusIfNeeded
- drawImage
- ellipse
- fill
- fillRect
- fillText
- getImageData
- getLineDash
- getTransform
- isPointInPath
- isPointInStroke
- lineTo
- measureText
- moveTo
- putImageData
- quadraticCurveTo
- rect
- resetTransform
- restore
- rotate
- save
- scale
- scrollPathIntoView
- setLineDash
- setTransform
- stroke
- strokeRect
- strokeText
- transform
- translate

## Properties

### canvas

canvas: HTMLCanvasElement

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3097

### direction

direction: CanvasDirection

Inherited from CanvasTextDrawingStyles.direction

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3124

### fillStyle

fillStyle: string | CanvasGradient | CanvasPattern

Inherited from CanvasFillStrokeStyles.fillStyle

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3015

### filter

filter: string

Inherited from CanvasFilters.filter

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3023

### font

font: string

Inherited from CanvasTextDrawingStyles.font

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3125

### globalAlpha

globalAlpha: number

Inherited from CanvasCompositing.globalAlpha

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:2990

### globalCompositeOperation

globalCompositeOperation: string

Inherited from CanvasCompositing.globalCompositeOperation

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:2991

### imageSmoothingEnabled

imageSmoothingEnabled: boolean

Inherited from CanvasImageSmoothing.imageSmoothingEnabled

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3051

### imageSmoothingQuality

imageSmoothingQuality: ImageSmoothingQuality

Inherited from CanvasImageSmoothing.imageSmoothingQuality

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3052

### lineCap

lineCap: CanvasLineCap

Inherited from CanvasPathDrawingStyles.lineCap

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3068

### lineDashOffset

lineDashOffset: number

Inherited from CanvasPathDrawingStyles.lineDashOffset

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3069

### lineJoin

lineJoin: CanvasLineJoin

Inherited from CanvasPathDrawingStyles.lineJoin

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3070

### lineWidth

lineWidth: number

Inherited from CanvasPathDrawingStyles.lineWidth

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3071

### miterLimit

miterLimit: number

Inherited from CanvasPathDrawingStyles.miterLimit

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3072

### shadowBlur

shadowBlur: number

Inherited from CanvasShadowStyles.shadowBlur

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3106

### shadowColor

shadowColor: string

Inherited from CanvasShadowStyles.shadowColor

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3107

### shadowOffsetX

shadowOffsetX: number

Inherited from CanvasShadowStyles.shadowOffsetX

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3108

### shadowOffsetY

shadowOffsetY: number

Inherited from CanvasShadowStyles.shadowOffsetY

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3109

### strokeStyle

strokeStyle: string | CanvasGradient | CanvasPattern

Inherited from CanvasFillStrokeStyles.strokeStyle

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3016

### textAlign

textAlign: CanvasTextAlign

Inherited from CanvasTextDrawingStyles.textAlign

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3126

### textBaseline

textBaseline: CanvasTextBaseline

Inherited from CanvasTextDrawingStyles.textBaseline

- Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3127

## Methods

### arc

- arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: undefined | false | true): void

- Inherited from CanvasPath.arc

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3056

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### radius: number

  - ##### startAngle: number

  - ##### endAngle: number

  - ##### Optional anticlockwise: undefined | false | true

  #### Returns void

### arcTo

- arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void

- Inherited from CanvasPath.arcTo

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3057

  #### Parameters

  - ##### x1: number

  - ##### y1: number

  - ##### x2: number

  - ##### y2: number

  - ##### radius: number

  #### Returns void

### beginPath

- beginPath(): void

- Inherited from CanvasDrawPath.beginPath

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3001

  #### Returns void

### bezierCurveTo

- bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void

- Inherited from CanvasPath.bezierCurveTo

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3058

  #### Parameters

  - ##### cp1x: number

  - ##### cp1y: number

  - ##### cp2x: number

  - ##### cp2y: number

  - ##### x: number

  - ##### y: number

  #### Returns void

### clearRect

- clearRect(x: number, y: number, w: number, h: number): void

- Inherited from CanvasRect.clearRect

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3091

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### w: number

  - ##### h: number

  #### Returns void

### clip

- clip(fillRule?: CanvasFillRule): void
- clip(path: Path2D, fillRule?: CanvasFillRule): void

- Inherited from CanvasDrawPath.clip

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3002

  #### Parameters

  - ##### Optional fillRule: CanvasFillRule

  #### Returns void

- Inherited from CanvasDrawPath.clip

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3003

  #### Parameters

  - ##### path: Path2D

  - ##### Optional fillRule: CanvasFillRule

  #### Returns void

### closePath

- closePath(): void

- Inherited from CanvasPath.closePath

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3059

  #### Returns void

### createImageData

- createImageData(sw: number, sh: number): ImageData
- createImageData(imagedata: ImageData): ImageData

- Inherited from CanvasImageData.createImageData

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3043

  #### Parameters

  - ##### sw: number

  - ##### sh: number

  #### Returns ImageData

- Inherited from CanvasImageData.createImageData

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3044

  #### Parameters

  - ##### imagedata: ImageData

  #### Returns ImageData

### createLinearGradient

- createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient

- Inherited from CanvasFillStrokeStyles.createLinearGradient

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3017

  #### Parameters

  - ##### x0: number

  - ##### y0: number

  - ##### x1: number

  - ##### y1: number

  #### Returns CanvasGradient

### createPattern

- createPattern(image: CanvasImageSource, repetition: string): CanvasPattern | null

- Inherited from CanvasFillStrokeStyles.createPattern

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3018

  #### Parameters

  - ##### image: CanvasImageSource

  - ##### repetition: string

  #### Returns CanvasPattern | null

### createRadialGradient

- createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient

- Inherited from CanvasFillStrokeStyles.createRadialGradient

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3019

  #### Parameters

  - ##### x0: number

  - ##### y0: number

  - ##### r0: number

  - ##### x1: number

  - ##### y1: number

  - ##### r1: number

  #### Returns CanvasGradient

### drawFocusIfNeeded

- drawFocusIfNeeded(element: Element): void
- drawFocusIfNeeded(path: Path2D, element: Element): void

- Inherited from CanvasUserInterface.drawFocusIfNeeded

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3142

  #### Parameters

  - ##### element: Element

  #### Returns void

- Inherited from CanvasUserInterface.drawFocusIfNeeded

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3143

  #### Parameters

  - ##### path: Path2D

  - ##### element: Element

  #### Returns void

### drawImage

- drawImage(image: CanvasImageSource, dx: number, dy: number): void
- drawImage(image: CanvasImageSource, dx: number, dy: number, dw: number, dh: number): void
- drawImage(image: CanvasImageSource, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void

- Inherited from CanvasDrawImage.drawImage

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:2995

  #### Parameters

  - ##### image: CanvasImageSource

  - ##### dx: number

  - ##### dy: number

  #### Returns void

- Inherited from CanvasDrawImage.drawImage

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:2996

  #### Parameters

  - ##### image: CanvasImageSource

  - ##### dx: number

  - ##### dy: number

  - ##### dw: number

  - ##### dh: number

  #### Returns void

- Inherited from CanvasDrawImage.drawImage

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:2997

  #### Parameters

  - ##### image: CanvasImageSource

  - ##### sx: number

  - ##### sy: number

  - ##### sw: number

  - ##### sh: number

  - ##### dx: number

  - ##### dy: number

  - ##### dw: number

  - ##### dh: number

  #### Returns void

### ellipse

- ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: undefined | false | true): void

- Inherited from CanvasPath.ellipse

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3060

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### radiusX: number

  - ##### radiusY: number

  - ##### rotation: number

  - ##### startAngle: number

  - ##### endAngle: number

  - ##### Optional anticlockwise: undefined | false | true

  #### Returns void

### fill

- fill(fillRule?: CanvasFillRule): void
- fill(path: Path2D, fillRule?: CanvasFillRule): void

- Inherited from CanvasDrawPath.fill

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3004

  #### Parameters

  - ##### Optional fillRule: CanvasFillRule

  #### Returns void

- Inherited from CanvasDrawPath.fill

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3005

  #### Parameters

  - ##### path: Path2D

  - ##### Optional fillRule: CanvasFillRule

  #### Returns void

### fillRect

- fillRect(x: number, y: number, w: number, h: number): void

- Inherited from CanvasRect.fillRect

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3092

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### w: number

  - ##### h: number

  #### Returns void

### fillText

- fillText(text: string, x: number, y: number, maxWidth?: undefined | number): void

- Inherited from CanvasText.fillText

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3118

  #### Parameters

  - ##### text: string

  - ##### x: number

  - ##### y: number

  - ##### Optional maxWidth: undefined | number

  #### Returns void

### getImageData

- getImageData(sx: number, sy: number, sw: number, sh: number): ImageData

- Inherited from CanvasImageData.getImageData

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3045

  #### Parameters

  - ##### sx: number

  - ##### sy: number

  - ##### sw: number

  - ##### sh: number

  #### Returns ImageData

### getLineDash

- getLineDash(): number[]

- Inherited from CanvasPathDrawingStyles.getLineDash

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3073

  #### Returns number[]

### getTransform

- getTransform(): DOMMatrix

- Inherited from CanvasTransform.getTransform

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3131

  #### Returns DOMMatrix

### isPointInPath

- isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean
- isPointInPath(path: Path2D, x: number, y: number, fillRule?: CanvasFillRule): boolean

- Inherited from CanvasDrawPath.isPointInPath

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3006

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### Optional fillRule: CanvasFillRule

  #### Returns boolean

- Inherited from CanvasDrawPath.isPointInPath

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3007

  #### Parameters

  - ##### path: Path2D

  - ##### x: number

  - ##### y: number

  - ##### Optional fillRule: CanvasFillRule

  #### Returns boolean

### isPointInStroke

- isPointInStroke(x: number, y: number): boolean
- isPointInStroke(path: Path2D, x: number, y: number): boolean

- Inherited from CanvasDrawPath.isPointInStroke

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3008

  #### Parameters

  - ##### x: number

  - ##### y: number

  #### Returns boolean

- Inherited from CanvasDrawPath.isPointInStroke

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3009

  #### Parameters

  - ##### path: Path2D

  - ##### x: number

  - ##### y: number

  #### Returns boolean

### lineTo

- lineTo(x: number, y: number): void

- Inherited from CanvasPath.lineTo

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3061

  #### Parameters

  - ##### x: number

  - ##### y: number

  #### Returns void

### measureText

- measureText(text: string): TextMetrics

- Inherited from CanvasText.measureText

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3119

  #### Parameters

  - ##### text: string

  #### Returns TextMetrics

### moveTo

- moveTo(x: number, y: number): void

- Inherited from CanvasPath.moveTo

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3062

  #### Parameters

  - ##### x: number

  - ##### y: number

  #### Returns void

### putImageData

- putImageData(imagedata: ImageData, dx: number, dy: number): void
- putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void

- Inherited from CanvasImageData.putImageData

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3046

  #### Parameters

  - ##### imagedata: ImageData

  - ##### dx: number

  - ##### dy: number

  #### Returns void

- Inherited from CanvasImageData.putImageData

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3047

  #### Parameters

  - ##### imagedata: ImageData

  - ##### dx: number

  - ##### dy: number

  - ##### dirtyX: number

  - ##### dirtyY: number

  - ##### dirtyWidth: number

  - ##### dirtyHeight: number

  #### Returns void

### quadraticCurveTo

- quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void

- Inherited from CanvasPath.quadraticCurveTo

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3063

  #### Parameters

  - ##### cpx: number

  - ##### cpy: number

  - ##### x: number

  - ##### y: number

  #### Returns void

### rect

- rect(x: number, y: number, w: number, h: number): void

- Inherited from CanvasPath.rect

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3064

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### w: number

  - ##### h: number

  #### Returns void

### resetTransform

- resetTransform(): void

- Inherited from CanvasTransform.resetTransform

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3132

  #### Returns void

### restore

- restore(): void

- Inherited from CanvasState.restore

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3113

  #### Returns void

### rotate

- rotate(angle: number): void

- Inherited from CanvasTransform.rotate

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3133

  #### Parameters

  - ##### angle: number

  #### Returns void

### save

- save(): void

- Inherited from CanvasState.save

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3114

  #### Returns void

### scale

- scale(x: number, y: number): void

- Inherited from CanvasTransform.scale

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3134

  #### Parameters

  - ##### x: number

  - ##### y: number

  #### Returns void

### scrollPathIntoView

- scrollPathIntoView(): void
- scrollPathIntoView(path: Path2D): void

- Inherited from CanvasUserInterface.scrollPathIntoView

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3144

  #### Returns void

- Inherited from CanvasUserInterface.scrollPathIntoView

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3145

  #### Parameters

  - ##### path: Path2D

  #### Returns void

### setLineDash

- setLineDash(segments: number[]): void

- Inherited from CanvasPathDrawingStyles.setLineDash

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3074

  #### Parameters

  - ##### segments: number[]

  #### Returns void

### setTransform

- setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void
- setTransform(transform?: DOMMatrix2DInit): void

- Inherited from CanvasTransform.setTransform

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3135

  #### Parameters

  - ##### a: number

  - ##### b: number

  - ##### c: number

  - ##### d: number

  - ##### e: number

  - ##### f: number

  #### Returns void

- Inherited from CanvasTransform.setTransform

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3136

  #### Parameters

  - ##### Optional transform: DOMMatrix2DInit

  #### Returns void

### stroke

- stroke(): void
- stroke(path: Path2D): void

- Inherited from CanvasDrawPath.stroke

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3010

  #### Returns void

- Inherited from CanvasDrawPath.stroke

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3011

  #### Parameters

  - ##### path: Path2D

  #### Returns void

### strokeRect

- strokeRect(x: number, y: number, w: number, h: number): void

- Inherited from CanvasRect.strokeRect

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3093

  #### Parameters

  - ##### x: number

  - ##### y: number

  - ##### w: number

  - ##### h: number

  #### Returns void

### strokeText

- strokeText(text: string, x: number, y: number, maxWidth?: undefined | number): void

- Inherited from CanvasText.strokeText

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3120

  #### Parameters

  - ##### text: string

  - ##### x: number

  - ##### y: number

  - ##### Optional maxWidth: undefined | number

  #### Returns void

### transform

- transform(a: number, b: number, c: number, d: number, e: number, f: number): void

- Inherited from CanvasTransform.transform

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3137

  #### Parameters

  - ##### a: number

  - ##### b: number

  - ##### c: number

  - ##### d: number

  - ##### e: number

  - ##### f: number

  #### Returns void

### translate

- translate(x: number, y: number): void

- Inherited from CanvasTransform.translate

  - Defined in node_modules/typedoc/node_modules/typescript/lib/lib.dom.d.ts:3138

  #### Parameters

  - ##### x: number

  - ##### y: number

  #### Returns void

Generated using TypeDoc