Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PtsCanvasRenderingContext2D

Hierarchy

  • CanvasRenderingContext2D
    • PtsCanvasRenderingContext2D

Index

Properties

CanvasRenderingContext2D

CanvasRenderingContext2D: object

Type declaration

  • constructor: function
    • new __type(): CanvasRenderingContext2D
    • Returns CanvasRenderingContext2D

  • prototype: CanvasRenderingContext2D

Optional backingStorePixelRatio

backingStorePixelRatio: number

canvas

canvas: HTMLCanvasElement

constructor

constructor: Function

The initial value of Object.prototype.constructor is the standard built-in Object constructor.

fillStyle

fillStyle: string | CanvasGradient | CanvasPattern

font

font: string

globalAlpha

globalAlpha: number

globalCompositeOperation

globalCompositeOperation: string

imageSmoothingEnabled

imageSmoothingEnabled: boolean

lineCap

lineCap: string

lineDashOffset

lineDashOffset: number

lineJoin

lineJoin: string

lineWidth

lineWidth: number

miterLimit

miterLimit: number

Optional mozBackingStorePixelRatio

mozBackingStorePixelRatio: number

mozImageSmoothingEnabled

mozImageSmoothingEnabled: boolean

Optional msBackingStorePixelRatio

msBackingStorePixelRatio: number

msFillRule

msFillRule: CanvasFillRule

Optional oBackingStorePixelRatio

oBackingStorePixelRatio: number

oImageSmoothingEnabled

oImageSmoothingEnabled: boolean

shadowBlur

shadowBlur: number

shadowColor

shadowColor: string

shadowOffsetX

shadowOffsetX: number

shadowOffsetY

shadowOffsetY: number

strokeStyle

strokeStyle: string | CanvasGradient | CanvasPattern

textAlign

textAlign: string

textBaseline

textBaseline: string

Optional webkitBackingStorePixelRatio

webkitBackingStorePixelRatio: number

webkitImageSmoothingEnabled

webkitImageSmoothingEnabled: boolean

Methods

arc

  • arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void
  • Parameters

    • x: number
    • y: number
    • radius: number
    • startAngle: number
    • endAngle: number
    • Optional anticlockwise: boolean

    Returns void

arcTo

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

    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • radius: number

    Returns void

beginPath

  • beginPath(): void
  • Returns void

bezierCurveTo

  • bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void
  • 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
  • Parameters

    • x: number
    • y: number
    • w: number
    • h: number

    Returns void

clip

  • clip(fillRule?: CanvasFillRule): void
  • Parameters

    • Optional fillRule: CanvasFillRule

    Returns void

closePath

  • closePath(): void
  • Returns void

createImageData

  • createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData
  • Parameters

    • imageDataOrSw: number | ImageData
    • Optional sh: number

    Returns ImageData

createLinearGradient

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

    • x0: number
    • y0: number
    • x1: number
    • y1: number

    Returns CanvasGradient

createPattern

  • createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern
  • Parameters

    • image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement
    • repetition: string

    Returns CanvasPattern

createRadialGradient

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

    • x0: number
    • y0: number
    • r0: number
    • x1: number
    • y1: number
    • r1: number

    Returns CanvasGradient

drawFocusIfNeeded

  • drawFocusIfNeeded(element: Element): void
  • Parameters

    • element: Element

    Returns void

drawImage

  • drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number): void
  • drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number, dstW: number, dstH: number): void
  • drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, srcX: number, srcY: number, srcW: number, srcH: number, dstX: number, dstY: number, dstW: number, dstH: number): void
  • Parameters

    • image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap
    • dstX: number
    • dstY: number

    Returns void

  • Parameters

    • image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap
    • dstX: number
    • dstY: number
    • dstW: number
    • dstH: number

    Returns void

  • Parameters

    • image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap
    • srcX: number
    • srcY: number
    • srcW: number
    • srcH: number
    • dstX: number
    • dstY: number
    • dstW: number
    • dstH: number

    Returns void

ellipse

  • ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void
  • Parameters

    • x: number
    • y: number
    • radiusX: number
    • radiusY: number
    • rotation: number
    • startAngle: number
    • endAngle: number
    • Optional anticlockwise: boolean

    Returns void

fill

  • fill(fillRule?: CanvasFillRule): void
  • Parameters

    • Optional fillRule: CanvasFillRule

    Returns void

fillRect

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

    • x: number
    • y: number
    • w: number
    • h: number

    Returns void

fillText

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

    • text: string
    • x: number
    • y: number
    • Optional maxWidth: number

    Returns void

getImageData

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

    • sx: number
    • sy: number
    • sw: number
    • sh: number

    Returns ImageData

getLineDash

  • getLineDash(): number[]
  • Returns number[]

hasOwnProperty

  • hasOwnProperty(v: string): boolean
  • Determines whether an object has a property with the specified name.

    Parameters

    • v: string

      A property name.

    Returns boolean

isPointInPath

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

    • x: number
    • y: number
    • Optional fillRule: CanvasFillRule

    Returns boolean

isPrototypeOf

  • isPrototypeOf(v: Object): boolean
  • Determines whether an object exists in another object's prototype chain.

    Parameters

    • v: Object

      Another object whose prototype chain is to be checked.

    Returns boolean

lineTo

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

    • x: number
    • y: number

    Returns void

measureText

  • measureText(text: string): TextMetrics
  • Parameters

    • text: string

    Returns TextMetrics

moveTo

  • moveTo(x: number, y: number): void
  • Parameters

    • x: number
    • y: number

    Returns void

propertyIsEnumerable

  • propertyIsEnumerable(v: string): boolean
  • Determines whether a specified property is enumerable.

    Parameters

    • v: string

      A property name.

    Returns boolean

putImageData

  • putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void
  • Parameters

    • imagedata: ImageData
    • dx: number
    • dy: number
    • Optional dirtyX: number
    • Optional dirtyY: number
    • Optional dirtyWidth: number
    • Optional dirtyHeight: number

    Returns void

quadraticCurveTo

  • quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void
  • Parameters

    • cpx: number
    • cpy: number
    • x: number
    • y: number

    Returns void

rect

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

    • x: number
    • y: number
    • w: number
    • h: number

    Returns void

restore

  • restore(): void
  • Returns void

rotate

  • rotate(angle: number): void
  • Parameters

    • angle: number

    Returns void

save

  • save(): void
  • Returns void

scale

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

    • x: number
    • y: number

    Returns void

setLineDash

  • setLineDash(segments: number[]): void
  • Parameters

    • segments: number[]

    Returns void

setTransform

  • setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void
  • Parameters

    • m11: number
    • m12: number
    • m21: number
    • m22: number
    • dx: number
    • dy: number

    Returns void

stroke

  • stroke(path?: Path2D): void
  • Parameters

    • Optional path: Path2D

    Returns void

strokeRect

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

    • x: number
    • y: number
    • w: number
    • h: number

    Returns void

strokeText

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

    • text: string
    • x: number
    • y: number
    • Optional maxWidth: number

    Returns void

toLocaleString

  • toLocaleString(): string
  • Returns a date converted to a string using the current locale.

    Returns string

toString

  • toString(): string
  • Returns a string representation of an object.

    Returns string

transform

  • transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void
  • Parameters

    • m11: number
    • m12: number
    • m21: number
    • m22: number
    • dx: number
    • dy: number

    Returns void

translate

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

    • x: number
    • y: number

    Returns void

valueOf

  • valueOf(): Object
  • Returns the primitive value of the specified object.

    Returns Object

Generated using TypeDoc