-----------GDI+ --------------
1:
Graphics.DrawBezier(pen,p1,p2,p3,p4);
画一条贝塞尔曲线,是用鼠标在pictureBox上画
如何从MouseDown获取这四个点2:
画了很多图形后,我如何用鼠标选择其中一个谢谢大家!!!

解决方案 »

  1.   

    Point[]   p=new   Point[4];   
      

  2.   

    就是Graphics.DrawBezier的参数吗?
    把图形画在form上后,用鼠标选不中吧
      

  3.   

    我做的是一个画图板1:鼠标在pictureBox上点四下,然后就直接可以根据这四个点画出曲线2:一般画图板上的图形都能选中,改变大小,删除呀
      

  4.   

     画线容易实现,就是以下方法
    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);
                }
            }