ICanvasRenderingContext2D.ClearRect

ICanvasRenderingContext2D.ClearRect method

Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black, erasing any previously drawn content.

public void ClearRect(double x, double y, double w, double h)
ParameterTypeDescription
xDoubleThe x axis of the coordinate for the rectangle starting point.
yDoubleThe y axis of the coordinate for the rectangle starting point.
wDoubleThe rectangle’s width.
hDoubleThe rectangle’s height.

See Also