VISRECT (Statement)


Draws a rectangle on the screen.


VISRECT <X coordinate>, <Y coordinate>, <width>, <height>[, <mode>
[, <angle>]]


<X coordinate >
Specifies the X coordinate of the rectangle to be drawn.
<Y coordinate >
Specifies the Y coordinate of the rectangle to be drawn.
<width>
Specifies the width of the rectangle to be drawn.
<height>
Specifies the height of the rectangle to be drawn.
<mode>
Specifies the mode for drawing.
0: Draws only an outline of the rectangle.
1: Draws a whole coated screen.
If ignored, 0 will be the default setting.
<angle>
Specifies the angle of the line to be drawn. If ignored, 0 degrees is will be the default setting.
  • Values of X and Y coordinates, lengths and angles are not checked. If they are out of the permissible drawing range, no error will result.
  • The object screen is the screen set with VISSCREEN.
  • The brightness value for drawing is the same as the brightness designated with VISBRIGHT.
  • For this instruction, a µVision board (option) is required.



VISPLNOUT 0
'Display the storage memory 0 (processing screen)
VISSCREEN 0,0,1
'Instantaneously draw on the processing screen 0
VISCLS 0
'Clear the screen
VISBRIGHT 255
'Set the brightness value for the drawing
FOR I1 = 0 TO 360 STEP 5
FOR VISRECT 256,256,100,100,0,I1
'Draw a rectangle with a height of 100
'and width of 100
NEXT I1
VISRECT 200,200,50,50,1,45
'Draw a coated rectangle with a height of 0
'50 and width of 50


Top