日期:2014-05-18 浏览次数:20935 次
Grap.TranslateTransform(0, pictureBoxGraph.Height - 1); Grap.ScaleTransform(1, -1); ------------------------------- if (IsDrawing && e.Button == MouseButtons.Left && !IsImgMove) { //将数据点存储以便画线 _DrawLine.Add(new Point(e.X, e.Y)); }
{ Grap.TranslateTransform(0, pictureBoxGraph.Height - 1); Grap.ScaleTransform(1, -1); this.matrix = Grap.Transform; // 得到转换矩阵 this.matrix.Inverse(); // 得到逆转换 } System.Drawing.Drawing2D.Matrix matrix = new Matrix(); void Form1_MouseDown(object sender, MouseEventArgs e) { Point[] points = {e.Location}; this.matrix.TransformPoints(points); //<-- this.Text = points[0].ToString(); }
------解决方案--------------------
Matrix Transform
看这个,http://nonocast.cn/?p=2835