本人前段时间一直在学习GDI+,也只是个小菜鸟,通过使用认为GraphicsPath的最大用处就是对图形边缘轮廓的绘制与填充。
比如:
Graphics g = Creategraphics();
Rectangle rect = new Rectangle(0,0,8,8);
GraphicsPath path = new GraphicsPath();
path.AddRectangle(rect);
g.FillPath(Brushes.Black, path);
建立了一个左下角为(0,0)、长宽均为8的矩形,将它添加到GraphicsPath中,并将它填充为黑色。