Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "rect"

Index

Functions

Const clear

  • clear(canvas: Canvas, reset?: boolean, code?: NumOrString): void
  • Clears/fills the canvas' current clip rect with given char (default: 0x20 / space). If reset is true, first resets all internal state (clipping, format, style), so that entire canvas will be cleared.

    Parameters

    • canvas: Canvas
    • Default value reset: boolean = false
    • Default value code: NumOrString = 32

    Returns void

Const fillRect

  • fillRect(canvas: Canvas, x: number, y: number, w: number, h: number, char: NumOrString, format?: number): void
  • Fills given rect with char, taking currect clip rect and format into account.

    Parameters

    • canvas: Canvas
    • x: number
    • y: number
    • w: number
    • h: number
    • char: NumOrString
    • Default value format: number = canvas.format

    Returns void

Const strokeRect

  • strokeRect(canvas: Canvas, x: number, y: number, w: number, h: number, format?: number): void
  • Draws an outline of given rect, taking the current clip rect, format and style into account.

    Parameters

    • canvas: Canvas
    • x: number
    • y: number
    • w: number
    • h: number
    • Default value format: number = canvas.format

    Returns void

Generated using TypeDoc