-----------GDI+ --------------
1:
Graphics.DrawBezier(pen,p1,p2,p3,p4);
画一条贝塞尔曲线,是用鼠标在pictureBox上画
如何从MouseDown获取这四个点2:
画了很多图形后,我如何用鼠标选择其中一个谢谢大家!!!
1:
Graphics.DrawBezier(pen,p1,p2,p3,p4);
画一条贝塞尔曲线,是用鼠标在pictureBox上画
如何从MouseDown获取这四个点2:
画了很多图形后,我如何用鼠标选择其中一个谢谢大家!!!
把图形画在form上后,用鼠标选不中吧
void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
polpen = new Pen(Color.Red);
al.Add(e.Location);
allpoint = new Point[al.Count];
for (int i = 0; i < al.Count; i++)
{
allpoint[i] = (Point)al[i];
} pictureBox1.Invalidate();
}
void pictureBox1_Paint(object sender, PaintEventArgs e)
{
if (allpoint != null)
{
if (allpoint.Length > 1)
e.Graphics.DrawPolygon(polpen, allpoint);
}
}