• Fills a rectangle with the given color for the whole canvas.

    Parameters

    • context: CanvasRenderingContext2D

      The canvas context to draw on.

    • dimension: IDimension

      The dimension of the rectangle.

    • image: undefined | HTMLImageElement

      The image to draw on the rectangle.

    • opacity: number

      The opacity of the image.

    Returns void