Box
Box
函数原型
void Box(int x0, int y0, int x1, int y1, int fill, int type);
功能
画矩形
说明
(x0, y0) 指定左上角坐标,(x1, y1) 指定右下角坐标。
type 决定画图方式,其值含义如下:
- type = 0: 2色模式下画白矩形,16色和256色模式下用背景色画矩形
- type = 1: 2色模式下画黑矩形,16色和256色模式下用前景色画矩形
- type = 2: 矩形的所有点取反
fill 决定是否填充矩形:
- fill = 0: 不填充矩形
- fill = 1: 填充矩形
示例
void main()
{
Box(1, 0, 111, 47, 1, 1);
getchar();
Box(20, 10, 100, 30, 0, 0);
getchar();
Box(40, 0, 80, 47, 1, 2);
getchar();
}