Skip to main content

DrawCanvasSegment

Callable

  • DrawCanvasSegment(Canvas: HTMLCanvasElement, Left: number, Top: number, Width: number, Height: number): HTMLCanvasElement

  • Returns a rectangular subsection of a canvas


    Parameters

    • Canvas: HTMLCanvasElement

      The source canvas to take a section of

    • Left: number

      The starting X co-ordinate of the section

    • Top: number

      The starting Y co-ordinate of the section

    • Width: number

      The width of the section to take

    • Height: number

      The height of the section to take

    Returns HTMLCanvasElement

    • The new canvas containing the section