Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RenderingContext

Hierarchy

Index

Properties

direction

direction: CanvasDirection

fillStyle

fillStyle: string | CanvasGradient | CanvasPattern

filter

filter: string

font

font: string

globalAlpha

globalAlpha: number

globalCompositeOperation

globalCompositeOperation: string

imageSmoothingEnabled

imageSmoothingEnabled: boolean

imageSmoothingQuality

imageSmoothingQuality: ImageSmoothingQuality

lineCap

lineCap: CanvasLineCap

lineDashOffset

lineDashOffset: number

lineJoin

lineJoin: CanvasLineJoin

lineWidth

lineWidth: number

miterLimit

miterLimit: number

shadowBlur

shadowBlur: number

shadowColor

shadowColor: string

shadowOffsetX

shadowOffsetX: number

shadowOffsetY

shadowOffsetY: number

strokeStyle

strokeStyle: string | CanvasGradient | CanvasPattern

textAlign

textAlign: CanvasTextAlign

textBaseline

textBaseline: CanvasTextBaseline

Methods

arc

  • arc(x: number, y: number, r: number, a0: number, a1: number, ccw?: undefined | false | true): void

arcTo

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

beginPath

  • beginPath(): void

bezierCurveTo

  • bezierCurveTo(x1: number, y1: number, x2: number, y2: number, x: number, y: number): void

clearRect

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

clip

  • clip(fillRule?: CanvasFillRule): void

closePath

  • closePath(): void

createImageData

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

createLinearGradient

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

createPattern

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

createRadialGradient

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

drawFocusIfNeeded

  • drawFocusIfNeeded(element: Element): 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

fill

  • fill(fillRule?: CanvasFillRule): void

fillRect

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

fillText

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

getImageData

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

getLineDash

  • getLineDash(): number[]

isPointInPath

  • isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean

isPointInStroke

  • isPointInStroke(x: number, y: number): boolean

lineTo

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

measureText

  • measureText(text: string): TextMetrics

moveTo

  • moveTo(x: number, y: number): 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

quadraticCurveTo

  • quadraticCurveTo(x1: number, y1: number, x: number, y: number): void

rect

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

restore

  • restore(): void

rotate

  • rotate(angle: number): void

save

  • save(): void

scale

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

scrollPathIntoView

  • scrollPathIntoView(): void

setLineDash

  • setLineDash(segments: number[]): void

setTransform

  • setTransform(x0: number, y0: number, x1: number, y1: number, tx: number, ty: number): void
  • setTransform(transform?: DOMMatrix2DInit): void

stroke

  • stroke(): void

strokeRect

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

strokeText

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

transform

  • transform(x0: number, y0: number, x1: number, y1: number, tx: number, ty: number): void

translate

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