Example #1
0
        private void btnRotateCCW_Click(object sender, EventArgs e)
        {
            var br = new BoundRect();

            foreach (var entity in this.Document.Action.SelectedEntity)
            {
                br.Union(entity.BoundRect);
            }
            if (br.IsEmpty)
            {
                return;
            }

            this.Document.Action.ActEntityRotate(this.Document.Action.SelectedEntity, 90, br.Center.X, br.Center.Y);
        }
Example #2
0
 private void btnZoomIn_Click(object sender, EventArgs e)
 {
     if (null == Document.Action.SelectedEntity || 0 == Document.Action.SelectedEntity.Count)
     {
         this.view?.OnZoomIn(new System.Drawing.Point(GLcontrol.Width / 2, GLcontrol.Height / 2));
     }
     else
     {
         var br = new BoundRect();
         foreach (var entity in Document.Action.SelectedEntity)
         {
             br.Union(entity.BoundRect);
         }
         this.view?.OnZoomIn(br);
     }
 }