C语言图形界面之创建方形函数
mnhstudio吧
全部回复
仅看楼主
level 8
sanwerº 楼主
void cjfx (unsigned char *vram, int xsize, unsigned char c, int x0,int y0 , int x1, int y1){
int x, y
for (y = y0; y <= y1; y++){
for (x = x0; x <= x1; x++){
vram[y * xsize + x] = c;
}
}
return
}
使用方法:
cjfx (q,320,颜色,左边,顶边,宽度,高度)
@lensen1234
2014年06月19日 08点06分 1
level 11
是不是从川合秀实的《三十天自制操作系统》那里搞的?
2014年06月19日 10点06分 2
level 11
是直接写显存
2014年06月19日 10点06分 3
level 11
而且顺便提一句,C函数命名的话cjfx这种像汉语拼音简称的东西不大好,可以叫Draw(Create)Rectangle之类的
2014年06月19日 10点06分 4
好吧
2014年07月28日 08点07分
level 11
[滑稽]
2014年06月20日 06点06分 5
额。。
2014年06月20日 08点06分
1