Promotic
WikipediaLinkedInYoutubeTwitterFacebook

clearRect - method of object CanvasCtx

Description:
Clears the pixels in specified rectangle
Syntax:
clearRect(x As Long, y As Long, width As Long, height As Long) As Object
Calling:
ctx.clearRect(x, y, width, height);
Parameters:
x(Long) The x-coordinate of the upper-left corner of the rectangle to clear
y(Long) The y-coordinate of the upper-left corner of the rectangle to clear
width(Long) Width of the rectangle to be cleared (in pixels).
height(Long) Height of the rectangle to be cleared (in pixels).
Note:
The method can also be called in the graphic item events for Web Panels.
See also:
Example:
ctx.fillStyle = "blue";
ctx.fillRect(0, 0, 300, 150);
ctx.clearRect(20, 20, 100, 50);
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice