private static void RemoveFirstPointAndShiftOthersBack(GraphLine line) { float interval = line.points[1].X - line.points[0].X; line.points.RemoveAt(0); for (int i = 0; i < line.points.Count; i++) line.points[i] = new Vector2D(line.points[i].X - interval, line.points[i].Y); }
public GraphLine CreateLine(string key, Color color) { var line = new GraphLine(this) { Key = key, Color = color }; Lines.Add(line); renderKey.Refresh(this); return line; }
private void PrunePointsFromLine(GraphLine line) { var numberOfPointsToRemove = line.points.Count - MaximumNumberOfPoints; if (numberOfPointsToRemove <= 0) return; for (int i = 0; i < numberOfPointsToRemove; i++) RemoveFirstPointAndShiftOthersBack(line); line.Refresh(); }
private static void RemoveFirstPointAndShiftOthersBack(GraphLine line) { float interval = line.points[1].X - line.points[0].X; line.points.RemoveAt(0); for (int i = 0; i < line.points.Count; i++) { line.points[i] = new Vector2D(line.points[i].X - interval, line.points[i].Y); } }
public GraphLine CreateLine(string key, Color color) { var line = new GraphLine(this) { Key = key, Color = color }; Lines.Add(line); renderKey.Refresh(this); return(line); }
private void PrunePointsFromLine(GraphLine line) { var numberOfPointsToRemove = line.points.Count - MaximumNumberOfPoints; if (numberOfPointsToRemove <= 0) { return; } for (int i = 0; i < numberOfPointsToRemove; i++) { RemoveFirstPointAndShiftOthersBack(line); } line.Refresh(); }
public void RemoveLine(GraphLine line) { line.Clear(); Lines.Remove(line); renderKey.Refresh(this); }