Exemple #1
0
        private static bool TearOff(ParallelLine parallelLine)
        {
            if (parallelLine == null)
            {
                return(false);
            }

            Drawing       drawing     = parallelLine.Drawing;
            PointPair     coordinates = parallelLine.Coordinates;
            FreePoint     point1      = Factory.CreateFreePoint(drawing, coordinates.P1);
            FreePoint     point2      = Factory.CreateFreePoint(drawing, coordinates.P2);
            LineTwoPoints line        = Factory.CreateLineTwoPoints(drawing, new[] { point1, point2 });

            using (drawing.ActionManager.CreateTransaction())
            {
                Actions.Add(drawing, point1);
                Actions.Add(drawing, point2);
                Actions.Add(drawing, line);
                Actions.ReplaceWithExisting(parallelLine, line);
                Actions.Remove(parallelLine);
            }

            drawing.RaiseDisplayProperties(line);

            return(true);
        }
Exemple #2
0
        public Axis()
        {
            Line = new LineTwoPoints();
            Line.SetZIndex(ZOrder.Axes);

            //Arrow = new Arrow();
            //Arrow.Dependencies.Add(Line);
            //Children.Add(Line, Arrow);
            Children.Add(Line);
        }
Exemple #3
0
        public Axis()
        {
            Line = new LineTwoPoints();
            Line.SetZIndex(ZOrder.Axes);

            //Arrow = new Arrow();
            //Arrow.Dependencies.Add(Line);
            //Children.Add(Line, Arrow);
            Children.Add(Line);
        }
Exemple #4
0
 public void Reverse()
 {
     LineTwoPoints.Convert(this, Factory.CreateRay(this.Drawing, this.Dependencies.Reverse().ToList()));
 }
Exemple #5
0
 public void ConvertToSegment()
 {
     LineTwoPoints.Convert(this, Factory.CreateSegment(this.Drawing, this.Dependencies));
 }