Ejemplo n.º 1
0
        internal void StopDrawingRubberEdge()
        {
            if (CurrentRubberEdge != null)
            {
                GViewer.Invalidate(
                    GViewer.CreateScreenRectFromTwoCornersInTheSource(
                        CurrentRubberEdge.BoundingBox.LeftTop,
                        CurrentRubberEdge.BoundingBox.RightBottom));
            }

            CurrentRubberEdge = null;
        }
Ejemplo n.º 2
0
        internal void DrawRubberEdge(EdgeGeometry edgeGeometry)
        {
            BBox rectToInvalidate = edgeGeometry.BoundingBox;

            if (CurrentRubberEdge != null)
            {
                BBox b = CurrentRubberEdge.BoundingBox;
                rectToInvalidate.Add(b);
            }
            CurrentRubberEdge = edgeGeometry;
            GViewer.Invalidate(GViewer.CreateScreenRectFromTwoCornersInTheSource(rectToInvalidate.LeftTop,
                                                                                 rectToInvalidate.RightBottom));
        }
 void ProcessPan(MouseEventArgs args)
 {
     if (ClientRectangle.Contains(args.X, args.Y))
     {
         if (args.Button == MouseButtons.Left)
         {
             gViewer.Transform[0, 2] = mouseDownTransform[0, 2] + args.X - mouseDownPoint.X;
             gViewer.Transform[1, 2] = mouseDownTransform[1, 2] + args.Y - mouseDownPoint.Y;
             gViewer.Invalidate();
         }
         else
         {
             GViewer.Hit(args);
         }
     }
 }
Ejemplo n.º 4
0
 private void ProcessPan(MouseEventArgs args)
 {
     if (ClientRectangle.Contains(args.X, args.Y))
     {
         if (args.Button == System.Windows.Forms.MouseButtons.Left)
         {
             double dx = (double)(args.X - mouseDownPoint.X);
             double dy = (double)(args.Y - mouseDownPoint.Y);
             dx /= gViewer.LocalScale;
             dy /= gViewer.LocalScale; //map it to real coord
             int dh = gViewer.ScaleFromSrcXToScroll(dx);
             int dv = gViewer.ScaleFromSrcYToScroll(dy);
             gViewer.HVal = mouseDownHVal - dh;
             gViewer.VVal = mouseDownVVal + dv;
             gViewer.Invalidate();
         }
         else
         {
             GViewer.Hit(args);
         }
     }
 }