LineJoin 枚举值及其含义
例程效果图:
例程:
private void Form1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
g.Clear(Color.White);
Pen p = new Pen(Color.Red,25);
//设置画笔结合方式为剪切连接
p.LineJoin = LineJoin.MiterClipped;
g.DrawRectangle(p,50,50,200,100);
//设置画笔结合方式为圆角
p.LineJoin = LineJoin.Round;
g.DrawRectangle(p,350,50,200,100);
//设置画笔的结合方式为斜切
p.LineJoin = LineJoin.Bevel;
g.DrawRectangle(p,50,250,200,100);
//设置画笔的结合方式为斜接
p.LineJoin = LineJoin.Miter;
g.DrawRectangle(p,350,250,200,100);
//释放资源
p.Dispose();
//g.Dispose() OnPaint事件中的对象不需要释放
}