| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 799 人关注过本帖
标题:为什么不能填充
只看楼主 加入收藏
peswe
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2006-11-22
收藏
 问题点数:0 回复次数:1 
为什么不能填充

为什么不能填充,望高手指点!~
#include "stdio.h"
#include <graphics.h>
#include <stdlib.h>
#include <conio.h>

void DrawQiPan(int x,int y,int row,int colum,int width);
main()
{
int driver=DETECT,mode;
int x=250,y=200,width=8,row=8,colum=8;
initgraph(&driver,&mode," ");
cleardevice();
setbkcolor(3);
setcolor(4);
DrawQiPan(x,y,row,colum,width);
getch();
closegraph();
}


void DrawQiPan(int x,int y,int row,int colum,int width)
{
int i,j;
for(i=0;i<row;i++)
{
for(j=0;j<colum;j++)
{
if((i+j)%2==0)
{
rectangle(x+i*width,y+j*width,x+(i+1)*width,y+(j+1)*width);
}
if((i+j)%2!=0)
{
setfillstyle(LTSLASH_FILL,0);
rectangle(x+i*width,y+j*width,x+(i+1)*width,y+(j+1)*width);
/*setfillstyle(LTSLASH_FILL,BLACK);*/
}
}
}
}


搜索更多相关主题的帖子: int row include DrawQiPan colum 
2007-05-27 22:27
peswe
Rank: 1
等 级:新手上路
帖 子:197
专家分:0
注 册:2006-11-22
收藏
得分:0 
不是吧,图形专区也没人会啊!~

C斗士~~~fighting!!!!
2007-05-29 22:01
快速回复:为什么不能填充
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013499 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved