示例#1
0
        public override void Execute()
        {
            int width = 0, height = 0, n = 0;

            n = graphicsList.SelectionCount;
            if (n > 0)
            {
                DrawObject obj = null;
                for (int i = n - 1; i >= 0; i--)
                {
                    obj    = (DrawObject)graphicsList.ASelection[i];
                    width  = (int)(obj.GetRectangle().Width *rate);
                    height = (int)(obj.GetRectangle().Height *rate);
                    obj.setRectangleWidth(width);
                    obj.setRectangleHeight(height);
                }
            }
        }
示例#2
0
 public override void Execute()
 {
     int x_aris = 0, y_aris = 0, width = 0, height = 0, n = 0;
     graphicsList.SelectAll();
     n = graphicsList.SelectionCount;
     DrawObject obj = null;
     for (int i = n - 1; i >= 0; i--)
     {
         obj = (DrawObject)graphicsList.ASelection[i];
         x_aris = (int)(obj.GetRectangle().X * rate);
         y_aris = (int)(obj.GetRectangle().Y * rate);
         width = (int)(obj.GetRectangle().Width * rate);
         height = (int)(obj.GetRectangle().Height * rate);
         obj.setRectangleX(x_aris);
         obj.setRectangleY(y_aris);
         obj.setRectangleWidth(width);
         obj.setRectangleHeight(height);
     }
 }