BASIC Screen Draw Statements and Functions - fvdhoef/aquarius-plus GitHub Wiki

RECT

TYPE: plusBASIC v0.70i graphics statement

FORMAT: RECT ( start-x , start-y ) - ( end-x , end-y )

Action: Draws a rectangle on the text screen.

  • start-x, start-y, end-x, and end-y specify the start and end positions of the line.
    • Illegal quantity error results if start-x and e<nd-x are less than 1 or greater than 38 in 40-column mode or 78 in 80-column mode.
  • The box is drawn in the default color, using the line drawing characters in character set 0.
Examples:
RECT (9,6)-(28,17)

Prints a 20 by 12 rectangle centered on the screen using the standard line drawing characters.

FORMAT: RECT ( start-x , start-y ) - ( end-x , end-y ) , drawchars

Action: As above, but draws the box using the specified characters.

  • drawchars is a string containing the drawing characters.
  • String length error results drawchars is not exactly 9 characters long
Draw characters string

The box draw characters are in the string are in the following order:

  • Top left
  • Top middle
  • Top right
  • Middle left
  • Fill character
  • Middle Right
  • Bottom left
  • Bottom middle
  • Bottom right
Examples:
RECT (1,1)-(5,6),$"B7A3EBB5A0EAF5F0FA"

Draws a 5 x 6 rectangle in the upper left corner of the screen using bloxel characters.

FORMAT: RECT ( start-x , start-y ) - ( end-x , end-y ) , drawchars , fgcolor , bgcolor

Action: As above, but draws the box using the specified colors,

  • fgcolor and bgcolor are the foreground and background colors, respectively.
    • Illegal quantity error results if either fgcolor or bgcolor are not in the range 0 through 15.
  • drawchars can be omitted, in which case the default line drawing characters will be used.
Examples:
RECT (30,20)-(38,24),$"B7A3EBB5A0EAF5F0FA",7,0

Draws a white on black 9 x 5 rectangle in the lower right corner of the screen using bloxel characters.

RECT (1,1)-(38,5),,1,7

Draws a red on white 38 by 5 rectangle at the top of the screen using line drawing characters characters.

FORMAT: RECT ( start-x , start-y ) - ( end-x , end-y ) , drawchars , drawcolors

Action: As above, but draws the box using the specified color list.

  • drawcolors is a string containing the drawing colors.

    • Each character of the string is a byte value representing the combined colors for the respective draw character.
  • String length error results drawchars is not exactly 9 characters long.

  • drawchars can be omitted, in which case the default line drawing characters will be used.

Examples:

Coming soon.

⚠️ **GitHub.com Fallback** ⚠️