Exemplo n.º 1
0
        public void InitData()
        {
            double rx = (double)(SEButton.GetLocation().X - NWButton.GetLocation().X) / (x1 - x0);
            double ry = (double)(SEButton.GetLocation().Y - NWButton.GetLocation().Y) / (y1 - y0);

            for (int i = 0; i < PointList.Count; i++)
            {
                Point t = (Point)PointList[i];
                t.X          = (int)(NWButton.GetLocation().X + (t.X - x0) * rx);
                t.Y          = (int)(NWButton.GetLocation().Y + (t.Y - y0) * ry);
                PointList[i] = t;
            }
        }