WebGraphics.DrawRectangle

From Xojo Documentation

Method

WebGraphics.DrawRectangle(x As Integer, y As Integer, width As Integer, height As Integer)

New in 2020r1

Supported for all project types and targets.

Draws the outline of a rectangle in the DrawingColor. x and y are the coordinates of the top-left corner. width and height specify the size of the rectangle.

Sample Code

This example draws two squares with a 5-pixel red border:

g.DrawingColor = Color.Red
g.PenSize = 5
g.DrawRectangle(10, 10, 100, 100)
g.DrawRectangle(130, 10, 100, 100)