public void Update(MarkupLine line, bool recalculate = false) { line.Update(true); foreach (var intersect in GetExistIntersects(line).ToArray()) { LineIntersects.Remove(intersect.Pair); intersect.Pair.GetOther(line).Update(); } foreach (var filler in GetLineFillers(line)) { filler.Update(); } foreach (var crosswalk in GetLinesIsBorder(line)) { crosswalk.Update(); } if (recalculate) { RecalculateDashes(); } }
private void RemoveLine(MarkupLine line) { foreach (var intersect in GetExistIntersects(line).ToArray()) { if (intersect.Pair.GetOther(line) is MarkupRegularLine regularLine) { regularLine.RemoveRules(line); } LineIntersects.Remove(intersect.Pair); } foreach (var filler in GetLineFillers(line).ToArray()) { FillersList.Remove(filler); } if (CrosswalksDictionary.ContainsKey(line)) { CrosswalksDictionary.Remove(line); } else { foreach (var crosswalk in GetLinesIsBorder(line)) { crosswalk.RemoveBorder(line); } } LinesDictionary.Remove(line.PointPair.Hash); }
private void RemoveLine(MarkupLine line) { foreach (var intersect in GetExistIntersects(line).ToArray()) { intersect.Pair.GetOther(line).RemoveRules(line); LineIntersects.Remove(intersect.Pair); } foreach (var filler in GetLineFillers(line).ToArray()) { FillersList.Remove(filler); } LinesDictionary.Remove(line.PointPair.Hash); }