WebGraphics.DrawRect

From Xojo Documentation

Method

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

Supported for all project types and targets.

Draws the outline of a rectangle in the current color (specified by ForeColor). x and y are the coordinates of the top-left corner. width and height specify the size of the rectangle.

Example

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

g.ForeColor = &cff0000
g.PenWidth = 5
g.DrawRect(10, 10, 100, 100)
g.DrawRect(130, 10, 100, 100)