rect - method of object CanvasCtx
Creates a rectangle.
rect(x As Long, y As Long, width As Long, height As Long) As Object
ctx.rect(x, y, width, height);
|x||(Long) The x-coordinate of the upper-left corner of the rectangle|
|y||(Long) The y-coordinate of the upper-left corner of the rectangle|
|width||(Long) The rectangle width (in pixels).|
|height||(Long) The rectangle height (in pixels).|
The method creates a path. Therefore before this method is called the beginPath
method should be called. For the rendering itself the stroke
method is used.
The method can also be called in the graphic item events for Web panels
// Blue rectangle
ctx.rect(50, 50, 150, 80);