DrawBox
Description
Draws a 2D box from one point on the screen to another with a chosen color using lines. Lines appear above all other drawing except the Print command and can be used with the GetImage function or SetRenderToImage to create new images. The XY coordinates are in screen coordinates so are not affected by the SetViewOffset command. Colors can be created using the MakeColor command or by using the bitwise operators like so, mycolor = (blue << 16) || (green << 8) || red
Definition
DrawBox( x, y, x2, y2, color1, color2, color3, color4, filled )
void agk::DrawBox( float x, float y, float x2, float y2, UINT color1, UINT color2, UINT color3, UINT color4, int filled )
Parameters
- x - The X component of the top left corner of the box.
- y - The Y component of the top left corner of the box.
- x2 - The X component of the bottom right corner of the box.
- y2 - The Y component of the bottom right corner of the box.
- color1 - The color to use in the top left corner.
- color2 - The color to use in the top right corner.
- color3 - The color to use in the bottom left corner.
- color4 - The color to use in the bottom right corner.
- filled - 1 to draw a filled box, 0 to draw an empty box.