vb.net 中通过Graphic怎么在原有的图片上绘制DrawLines

如题所述

第1个回答  2011-12-12
一般Graphics都是通过控件比如Panel,PictureBox来进行绘制的,

PictureBox pb= new PictureBox();
pb.Paint += new System.Windows.Forms.PaintEventHandler(this.Test_Paint);

void Test_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
g.DrawImage(....);
g.DrawLine(...);

}

vb.net 中通过Graphic怎么在原有的图片上绘制DrawLines
一般Graphics都是通过控件比如Panel,PictureBox来进行绘制的,PictureBox pb= new PictureBox();pb.Paint += new System.Windows.Forms.PaintEventHandler(this.Test_Paint);void Test_Paint(object sender, PaintEventArgs e){ Graphics g = e.Graphics;g.DrawImage(...);g.DrawLine(...);} ...

相似回答