JavaScript: The Definitive Guide

25.16. CanvasRenderingContext2D.clearRect( ): erase a rectangular area of a canvas

25.16.1. Synopsis

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

25.16.1.1. Arguments

x, y

The coordinates of the upper-left corner of the rectangle.

width, height

The dimensions of the rectangle.

25.16.2. Description

clearRect( ) erases the specified rectangle, filling it with a transparent color.

Категории