为什么不能填充
<P>为什么不能填充,望高手指点!~<BR>#include "stdio.h"<BR>#include <graphics.h><BR>#include <stdlib.h><BR>#include <conio.h></P><P>void DrawQiPan(int x,int y,int row,int colum,int width);<BR>main()<BR>{<BR> int driver=DETECT,mode;<BR> int x=250,y=200,width=8,row=8,colum=8;<BR> initgraph(&driver,&mode," ");<BR> cleardevice();<BR> setbkcolor(3);<BR> setcolor(4);<BR> DrawQiPan(x,y,row,colum,width);<BR> getch();<BR> closegraph();<BR>}</P>
<P><BR>void DrawQiPan(int x,int y,int row,int colum,int width)<BR>{<BR> int i,j;<BR> for(i=0;i<row;i++)<BR> {<BR> for(j=0;j<colum;j++)<BR> {<BR> if((i+j)%2==0)<BR> {<BR> rectangle(x+i*width,y+j*width,x+(i+1)*width,y+(j+1)*width);<BR> }<BR> if((i+j)%2!=0)<BR> {<BR> setfillstyle(LTSLASH_FILL,0);<BR> rectangle(x+i*width,y+j*width,x+(i+1)*width,y+(j+1)*width);<BR> /*setfillstyle(LTSLASH_FILL,BLACK);*/<BR> }<BR> }<BR> }<BR>}</P>
<P> <BR></P> 不是吧,图形专区也没人会啊!~[em13]
页:
[1]
