color.c
资源名称:leda.tar.gz [点击查看]
上传用户:gzelex
上传日期:2007-01-07
资源大小:707k
文件大小:0k
源码类别:
数值算法/人工智能
开发平台:
MultiPlatform
- #include <LEDA/window.h>
- window W(500,500);
- void draw_mouse_label(double x, double y)
- { W.draw_text(x,y,"MOUSE","steelblue"); }
- main()
- {
- W.init(0,4,0);
- W.set_show_coordinates(false);
- W.clear("grey30");
- for(int i=0;i<16;i++)
- { W.set_line_style(solid);
- int y = 10*(i+1);
- W.draw_disc(i%4+0.5,i/4+0.5,0.45,i);
- W.draw_circle(i%4+0.5,i/4+0.5,0.45,black);
- }
- double x,y;
- W.read_mouse_action(draw_mouse_label,x,y);
- return 0;
- }