Skip to main content

DrawImageZoomCanvas

Callable

  • DrawImageZoomCanvas(Source: string | HTMLCanvasElement | HTMLImageElement, Canvas: CanvasRenderingContext2D, SX: number, SY: number, SWidth: number, SHeight: number, X: number, Y: number, Width: number, Height: number, Invert?: boolean): boolean

  • Draws a zoomed image from a source to a specific canvas


    Parameters

    • Source: string | HTMLCanvasElement | HTMLImageElement

      URL of image or image itself

    • Canvas: CanvasRenderingContext2D

      Canvas on which to draw the image

    • SX: number

      The X coordinate where to start clipping

    • SY: number

      The Y coordinate where to start clipping

    • SWidth: number

      The width of the clipped image

    • SHeight: number

      The height of the clipped image

    • X: number

      Position of the image on the X axis

    • Y: number

      Position of the image on the Y axis

    • Width: number

      Width of the image

    • Height: number

      Height of the image

    • optionalInvert: boolean

      Flips the image vertically

    Returns boolean

    • whether the image was complete or not