a2FillBox

This command will draw a filled box on the screen.

  Syntax
a2Box x1, y1, x2, y2, color
a2Box x1, y1, x2, y2, color1, color2, color3, color4
  Parameters
x1
Float
This value specifies the top left corner X coordinate of the box.
y1
Float
This value specifies the top left corner Y coordinate of the box.
x2
Float
This value specifies the bottom right corner X coordinate of the box.
y2
Float
This value specifies the bottom right corner Y coordinate of the box.
color1
Integer
This value is a 32 bit integer specifying alpha, red, green, and blue color levels of the top left corner of the box.
color2
Integer
This value is a 32 bit integer specifying alpha, red, green, and blue color levels of the top right corner of the box.
color3
Integer
This value is a 32 bit integer specifying alpha, red, green, and blue color levels of the bottom right corner of the box.
color4
Integer
This value is a 32 bit integer specifying alpha, red, green, and blue color levels of the bottom left corner of the box.

  Returns

This command does not return a value.

  Description

The command requires the top left and bottom right coordinates of the box and at least one 32 bit color value. If only one color is specified, the box is drawn in that color. If four colors are specified, the color of the box is a gradient starting at the top left corner, and continuing in clockwise order around the box. Note that this order is not the same as the order used by DBPro's native BOX command.

  Example Code
a2FillBox 50, 50, 100, 100, 0xFFFF0000
a2FillBox 50, 150, 150, 250, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFFFFFFFF

rem Illustrating the difference in color order between
rem DBPro's native box command and Advanced 2D's color order.

box 160, 150, 260, 250, 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFFFFFFFF

WAIT KEY
  See also

a2Box
Advanced 2D Index
Main Menu