Skip to main content

Rect

Rect (Statement)

Format

rect x_position,y_position,width,height
rect ( x_position, y_position, width, height )

Description

Draws a width x height pixel rectangle using the current pen and brush colors. The top left corner is located at x_position,y_position.

The coordinates may be whole numbers or fractions. They are measured in pixels unless a Window has been set, in which case they are in the units that window defines.

Example

clg

color red
rect 50,50,150,150

penwidth 10
color blue, yellow
rect 100,100,150,150

color green, clear
rect 10,130,280,40

draws
rect.png

See Also

Arc, Chord, Circle, GetPenWidth, Line, PenWidth, Pie, Plot, Poly, Rect, Stamp, Window

History