Name
CRC.clearRect() — erases a rectangular area of a canvas
Synopsis
void clearRect(floatx
, floaty
, floatwidth
, floatheight
)
Arguments
x, y
The coordinates of the upper-left corner of the rectangle
width, height
The dimensions of the rectangle
Description
clearRect()
fills the specified rectangle with
transparent black. Unlike rect()
, it does not affect
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.