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); }
public Axis() { Line = new LineTwoPoints(); Line.SetZIndex(ZOrder.Axes); //Arrow = new Arrow(); //Arrow.Dependencies.Add(Line); //Children.Add(Line, Arrow); Children.Add(Line); }
public void Reverse() { LineTwoPoints.Convert(this, Factory.CreateRay(this.Drawing, this.Dependencies.Reverse().ToList())); }
public void ConvertToSegment() { LineTwoPoints.Convert(this, Factory.CreateSegment(this.Drawing, this.Dependencies)); }