clearRect method
Clears a part of the canvas.
- Applies
style
if provided.
Implementation
@override
void clearRect(num x, num y, num width, num height, {PStyle? style}) {
x = transform.x(x);
y = transform.y(y);
x = canvasX(x);
y = canvasY(y);
width = canvasX(width);
height = canvasY(height);
_ctx.clearRect(x, y, width, height);
if (style != null) {
fillRect(x, y, width, height, style);
}
}