fillRect method

void fillRect(
  1. num x,
  2. num y,
  3. num w,
  4. num h,
)

The CanvasRenderingContext2D.fillRect() method of the Canvas 2D API draws a rectangle that is filled according to the current CanvasRenderingContext2D.fillStyle.

This method draws directly to the canvas without modifying the current path, so any subsequent CanvasRenderingContext2D.fill or CanvasRenderingContext2D.stroke calls will have no effect on it.

Implementation

external void fillRect(
  num x,
  num y,
  num w,
  num h,
);