Type alias Graphics

Graphics: {
    circle: ((position: Point, radius: number, options: CircleOptions) => void);
    clear: ((colour?: string) => void);
    clearRect: ((rectangle: Rectangle, colour?: string) => void);
    curve: ((from: Point, to: Point, controlPoints: {
        cp1?: Point;
        cp2?: Point;
    }, options: LineOptions) => void);
    dodge: ((drawingOperations: (() => void)) => void);
    image: ((image: HTMLImageElement, position: Point, size: Size) => void);
    line: ((from: Point, to: Point, options: LineOptions) => void);
    overlay: ((drawingOperations: (() => void)) => void);
    rect: ((rectangle: Rectangle, options: RectangleOptions) => void);
    rotation: ((drawingOperations: (() => void), rotation: number, around: Point) => void);
    shadow: ((drawingOperations: (() => void), options?: DropShadowOptions) => void);
    sprite: ((sprite: Sprite) => void);
    square: ((position: Point, size: number, options: RectangleOptions) => void);
    subImage: ((image: HTMLImageElement, position: Point, size: Size, subPosition: Point, subSize: Size) => void);
    text: ((position: Point, text: string, colour: string, font: string) => void);
    tiles: ((position: Point, tileGrid: number[][], spriteSheets: Terrain[], scale: number) => void);
    transparency: ((drawingOperations: (() => void)) => void);
}

Type declaration

  • circle: ((position: Point, radius: number, options: CircleOptions) => void)
  • clear: ((colour?: string) => void)
      • (colour?: string): void
      • Parameters

        • Optional colour: string

        Returns void

  • clearRect: ((rectangle: Rectangle, colour?: string) => void)
      • (rectangle: Rectangle, colour?: string): void
      • Parameters

        • rectangle: Rectangle
        • Optional colour: string

        Returns void

  • curve: ((from: Point, to: Point, controlPoints: {
        cp1?: Point;
        cp2?: Point;
    }, options: LineOptions) => void)
  • dodge: ((drawingOperations: (() => void)) => void)
      • (drawingOperations: (() => void)): void
      • Parameters

        • drawingOperations: (() => void)
            • (): void
            • Returns void

        Returns void

  • image: ((image: HTMLImageElement, position: Point, size: Size) => void)
      • (image: HTMLImageElement, position: Point, size: Size): void
      • Parameters

        • image: HTMLImageElement
        • position: Point
        • size: Size

        Returns void

  • line: ((from: Point, to: Point, options: LineOptions) => void)
  • overlay: ((drawingOperations: (() => void)) => void)
      • (drawingOperations: (() => void)): void
      • Parameters

        • drawingOperations: (() => void)
            • (): void
            • Returns void

        Returns void

  • rect: ((rectangle: Rectangle, options: RectangleOptions) => void)
  • rotation: ((drawingOperations: (() => void), rotation: number, around: Point) => void)
      • (drawingOperations: (() => void), rotation: number, around: Point): void
      • Parameters

        • drawingOperations: (() => void)
            • (): void
            • Returns void

        • rotation: number
        • around: Point

        Returns void

  • shadow: ((drawingOperations: (() => void), options?: DropShadowOptions) => void)
      • (drawingOperations: (() => void), options?: DropShadowOptions): void
      • Parameters

        • drawingOperations: (() => void)
            • (): void
            • Returns void

        • Optional options: DropShadowOptions

        Returns void

  • sprite: ((sprite: Sprite) => void)
      • (sprite: Sprite): void
      • Parameters

        Returns void

  • square: ((position: Point, size: number, options: RectangleOptions) => void)
  • subImage: ((image: HTMLImageElement, position: Point, size: Size, subPosition: Point, subSize: Size) => void)
      • (image: HTMLImageElement, position: Point, size: Size, subPosition: Point, subSize: Size): void
      • Parameters

        Returns void

  • text: ((position: Point, text: string, colour: string, font: string) => void)
      • (position: Point, text: string, colour: string, font: string): void
      • Parameters

        • position: Point
        • text: string
        • colour: string
        • font: string

        Returns void

  • tiles: ((position: Point, tileGrid: number[][], spriteSheets: Terrain[], scale: number) => void)
      • (position: Point, tileGrid: number[][], spriteSheets: Terrain[], scale: number): void
      • Parameters

        • position: Point
        • tileGrid: number[][]
        • spriteSheets: Terrain[]
        • scale: number

        Returns void

  • transparency: ((drawingOperations: (() => void)) => void)
      • (drawingOperations: (() => void)): void
      • Parameters

        • drawingOperations: (() => void)
            • (): void
            • Returns void

        Returns void

Generated using TypeDoc