| 编程中国 | 业界新闻 | 技术文章 | 视频教程 | 下载频道 | 程序源码 | 个人空间 | 编程论坛
学习型 ASP/PHP/ASP.NET 主机 35元/年全能ASP/PHP/ASP.NET主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
赛孚耐:软件保护加密专家身份认证令牌USB KEY  
共有 333 人关注过本帖
标题:为什么不能填充
收藏  订阅  推荐  打印 
peswe
Rank: 3Rank: 3
等级:中级会员
帖子:197
积分:2130
注册:2006-11-22
为什么不能填充

为什么不能填充,望高手指点!~
#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-5-27 22:27
peswe
Rank: 3Rank: 3
等级:中级会员
帖子:197
积分:2130
注册:2006-11-22

不是吧,图形专区也没人会啊!~

C斗士~~~fighting!!!!
2007-5-29 22:01
关于我们 | 广告合作 | 编程中国 | 清除Cookies | Archiver | WAP | TOP

编程中国 版权所有,并保留所有权利。鲁ICP备08000592号
Powered by Discuz, Processed in 0.061979 second(s), 9 queries.
Copyright©2004-2008, BCCN.NET, All Rights Reserved