操作实例:
使用画笔和画刷:
Pen myPen=new Pen(Color.Black); Graphics g=this.CreateGraphics(); g.DrawRectangle(myPen,30,30,70,50);
绘制直线:
Graphics g=this.CreateGraphics(); Pen myPen=new Pen(Color.Red); g.DrawLine(myPen,130,30,70,50);
时间: 2024-10-27 05:12:49
操作实例:
使用画笔和画刷:
Pen myPen=new Pen(Color.Black); Graphics g=this.CreateGraphics(); g.DrawRectangle(myPen,30,30,70,50);
绘制直线:
Graphics g=this.CreateGraphics(); Pen myPen=new Pen(Color.Red); g.DrawLine(myPen,130,30,70,50);