Methods
Abstract drawCircle
- drawCircle(x: number, y: number, r: number, color: string): void
Parameters
x: number
y: number
r: number
color: string
Returns void
Abstract drawRect
- drawRect(x: number, y: number, w: number, h: number, color: string): void
Parameters
x: number
y: number
w: number
h: number
color: string
Returns void
Abstract drawRoundRect
- drawRoundRect(x: number, y: number, w: number, h: number, r: number, color: string): void
Parameters
x: number
y: number
w: number
h: number
r: number
color: string
Returns void
Abstract drawSprite
- drawSprite(x: number, y: number, w: number, h: number, texture: TextureBase<"image">, frameWidth?: number, frameHeight?: number, currentRow?: number, currentCol?: number): void
Parameters
x: number
y: number
w: number
h: number
Optional frameWidth: number
Optional frameHeight: number
Optional currentRow: number
Optional currentCol: number
Returns void
Abstract drawText
- drawText(text: string, x: number, y: number, maxWidth?: number): void
Parameters
text: string
x: number
y: number
Optional maxWidth: number
Returns void
Abstract measureText
- measureText(font: string, text: string): void
Abstract scale
- scale(x: number, y: number): void
Abstract setBlendMode
- setBlendMode(blendMode: "color" | "multiply" | "source-over" | "source-in" | "source-out" | "source-atop" | "destination-over" | "destination-in" | "destination-out" | "destination-atop" | "lighter" | "copy" | "xor" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "luminosity"): void
Parameters
blendMode: "color" | "multiply" | "source-over" | "source-in" | "source-out" | "source-atop" | "destination-over" | "destination-in" | "destination-out" | "destination-atop" | "lighter" | "copy" | "xor" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "luminosity"
Returns void
Abstract setFillColor
- setFillColor(color: string): void
Abstract setFont
- setFont(font: string): void
Abstract setLineWidth
- setLineWidth(width: number): void
Abstract setStrokeColor
- setStrokeColor(color: string): void
Abstract strokeText
- strokeText(text: string, x: number, y: number, maxWidth?: number): void
Parameters
text: string
x: number
y: number
Optional maxWidth: number
Returns void
Abstract transform
- transform(a: number, b: number, c: number, d: number, e: number, f: number): void
Parameters
a: number
b: number
c: number
d: number
e: number
f: number
Returns void
Abstract translate
- translate(x: number, y: number): void