Name

CRC.fillRect() — fills a rectangle

Synopsis

void fillRect(float x, float y,
              float width, float height)

Arguments

x, y

The coordinates of the upper-left corner of the rectangle

width, height

The dimensions of the rectangle

Description

fillRect() fills the specified rectangle with the color, gradient, or pattern specified by the fillStyle property.

Unlike the rect() method, fillRect() has no effect on the current point or the current path.

Get Canvas Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.