none
C# Winform 里用Graphics.RotateTransform 旋转后拖动问题 RRS feed

答案

  • 你好:

    尝试一下Matrix的方法,例如:

    public void RotateRectangle(Graphics g, Rectangle r, float angle) {
      using (Matrix m = new Matrix()) {
        m.RotateAt(angle, new PointF(r.Left + (r.Width / 2),
                                  r.Top + (r.Height / 2)));
        g.Transform = m;
        g.DrawRectangle(Pens.Black, r);
        g.ResetTransform();
      }
    }


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2015年5月25日 10:24
    版主