Monday, January 28, 2008

Using GDI+

我是刚接触GDI+的,其主要的内容也就是包含Graphics类的使用,笔刷brush,颜色color,还有pen以及font。GDI+在windows窗体应用程序中,最主要的功能就是绘制图形,比如对象的形状,位置,大小等等。
其中,关键是Graphics类的使用,它执行图形操作以及收集有关显示信息的方法和属性。Graphics类使用其他类完成绘图和显示。比如,我们可以综合使用brush类和Graphics对矩形进行填充。
Rectangle[] theboxes =new Rectangle[]{
new Rectangle(15,15,200,50),
new Rectangle(30,40,20,200),
new Rectangle(100,100,50,50),
new Rectangle(200,100,200,200),
};
e.Graphics.FillRectangles(Brushes.Red,theboxes);

当然,GDI+的功能是很强大的,我也在摸索中。希望我们能一起探讨!

发表于 2004年7月13日 17:09


Related Posts



0 Comments:

 

gf

rgdfgfdg

gf

gf

gf