BASIC Language Reference Manual > Command and Function Reference >

BAR Command


Draws a bar (a filled rectangle) on the screen using the current graphics pen color.


BAR x1 coordinate, y1 coordinate, x2 coordinate, y2 coordinate

Remarks and Examples

The BAR command will draw a filled rectangle on the screen from the (x1, y1) coordinate to the (x2, y2) coordinate.

The rectangle will be drawn using the current graphics pen color. The graphics pen color can be changed using the PENCOLOR command.


REM Draw a red rectangle from (100, 150) to (400, 200)
PENCOLOR 255, 0, 0
BAR 100, 150, 400, 200

See also: BOX, PENCOLOR, Overview of Graphics Programming in ReadyBASIC

Copyright 2006-2012, Kevin Matz, All Rights Reserved.