public Span Clone() { var newSpan = new Span(); if (Begin != null) { newSpan.Begin = Begin.Clone(); } newSpan.BeginFlags = BeginFlags; newSpan.Color = Color; newSpan.Continuation = Continuation; if (End != null) { newSpan.End = End.Clone(); } newSpan.EndFlags = EndFlags; newSpan.Escape = Escape; if (Exit != null) { newSpan.Exit = Exit.Clone(); } newSpan.ExitFlags = ExitFlags; newSpan.NextColor = NextColor; newSpan.Rule = Rule; newSpan.StopAtEol = StopAtEol; newSpan.TagColor = TagColor; newSpan.BeginTagColor = beginTagColor; newSpan.EndTagColor = endTagColor; return(newSpan); }
private IEnumerable <Line> SplitZAxis(int size) { var output = new List <Line>(); var nextPoint = Start.Clone(); while ((End.Z - nextPoint.Z) > size) { var endPoint = new Point { Y = End.Y, X = End.X, Z = nextPoint.Z + size }; output.Add(new Line { Block = Block, Start = nextPoint.Clone(), End = endPoint, Data = Data, BlockName = BlockName }); nextPoint = endPoint.Clone(); nextPoint.Y = Start.Y; nextPoint.X = Start.X; nextPoint.Z++; } output.Add(new Line { Start = nextPoint, End = End.Clone(), Block = Block, Data = Data, BlockName = BlockName }); return(output); }
private IEnumerable <Line> SplitXAxis(int size) { var output = new List <Line>(); var nextPoint = Start.Clone(); while ((End.X - nextPoint.X) > size) { var endPoint = new Point() { Y = End.Y, Z = End.Z, X = nextPoint.X + size }; output.Add(new Line() { Block = Block, Start = nextPoint.Clone(), End = endPoint }); nextPoint = endPoint.Clone(); nextPoint.Y = Start.Y; nextPoint.Z = Start.Z; nextPoint.X++; } output.Add(new Line() { Start = nextPoint, End = End.Clone(), Block = Block }); return(output); }
public override NoteRest Clone() { var clone = (Note)MemberwiseClone(); clone.Start = Start.Clone(); clone.End = End?.Clone(); return(clone); }
public Line Shift(Position position) { return(new Line { Block = Block, BlockName = BlockName, Data = Data, Start = Start.Clone().Shift(position), End = End.Clone().Shift(position) }); }
public IEnumerable <CoordinateF> GetBoxPoints() { yield return(new CoordinateF(Start.X, End.Y, End.Z)); yield return(End.Clone()); yield return(new CoordinateF(Start.X, Start.Y, End.Z)); yield return(new CoordinateF(End.X, Start.Y, End.Z)); yield return(new CoordinateF(Start.X, End.Y, Start.Z)); yield return(new CoordinateF(End.X, End.Y, Start.Z)); yield return(Start.Clone()); yield return(new CoordinateF(End.X, Start.Y, Start.Z)); }
public CoordinateF[][] GetBoxFaces() { var topLeftBack = new CoordinateF(Start.X, End.Y, End.Z); var topRightBack = End.Clone(); var topLeftFront = new CoordinateF(Start.X, Start.Y, End.Z); var topRightFront = new CoordinateF(End.X, Start.Y, End.Z); var bottomLeftBack = new CoordinateF(Start.X, End.Y, Start.Z); var bottomRightBack = new CoordinateF(End.X, End.Y, Start.Z); var bottomLeftFront = Start.Clone(); var bottomRightFront = new CoordinateF(End.X, Start.Y, Start.Z); return(new[] { new[] { topLeftFront, topRightFront, bottomRightFront, bottomLeftFront }, new[] { topRightBack, topLeftBack, bottomLeftBack, bottomRightBack }, new[] { topLeftBack, topLeftFront, bottomLeftFront, bottomLeftBack }, new[] { topRightFront, topRightBack, bottomRightBack, bottomRightFront }, new[] { topLeftBack, topRightBack, topRightFront, topLeftFront }, new[] { bottomLeftFront, bottomRightFront, bottomRightBack, bottomLeftBack } }); }
public IEnumerable <LineF> GetBoxLines() { var topLeftBack = new CoordinateF(Start.X, End.Y, End.Z); var topRightBack = End.Clone(); var topLeftFront = new CoordinateF(Start.X, Start.Y, End.Z); var topRightFront = new CoordinateF(End.X, Start.Y, End.Z); var bottomLeftBack = new CoordinateF(Start.X, End.Y, Start.Z); var bottomRightBack = new CoordinateF(End.X, End.Y, Start.Z); var bottomLeftFront = Start.Clone(); var bottomRightFront = new CoordinateF(End.X, Start.Y, Start.Z); yield return(new LineF(topLeftBack, topRightBack)); yield return(new LineF(topLeftFront, topRightFront)); yield return(new LineF(topLeftBack, topLeftFront)); yield return(new LineF(topRightBack, topRightFront)); yield return(new LineF(topLeftBack, bottomLeftBack)); yield return(new LineF(topLeftFront, bottomLeftFront)); yield return(new LineF(topRightBack, bottomRightBack)); yield return(new LineF(topRightFront, bottomRightFront)); yield return(new LineF(bottomLeftBack, bottomRightBack)); yield return(new LineF(bottomLeftFront, bottomRightFront)); yield return(new LineF(bottomLeftBack, bottomLeftFront)); yield return(new LineF(bottomRightBack, bottomRightFront)); }
public BoxF Clone() { return(new BoxF(Start.Clone(), End.Clone())); }
public override Shape DeepClone() { return(new Line(Start.Clone(), End.Clone(), Color, Width)); }
public override Shape DeepClone() { return(new Arc(Start.Clone(), End.Clone(), Radius, Color, Width)); }
public Wall Clone() { return(new Wall(Start.Clone(), End.Clone(), IsHorizontal)); }
public override NoteRest Clone() { return(new Rest(Start.Clone(), End?.Clone())); }
public override Shape DeepClone() { return(new Measurement(Start.Clone(), End.Clone(), Color, Location, ConversionRate, Unit)); }