TileStatistic GetOrCreateTileStatistic(Point p) { Tuple <int, int> t = DeviceIndependendZoomCalculatorForNodes.PointToTuple(_geomGraph.LeftBottom, p, GetGridSize()); TileStatistic ts; if (tileTableForStatistic.TryGetValue(t, out ts)) { return(ts); } tileTableForStatistic[t] = ts = new TileStatistic { rails = 0, vertices = 0 }; return(ts); }
void CreateStatisticsForArrowhead(Arrowhead arrowhead) { TileStatistic tile = GetOrCreateTileStatistic(arrowhead.TipPosition); tile.rails++; }
TileStatistic GetOrCreateTileStatistic(Point p) { Tuple<int, int> t = DeviceIndependendZoomCalculatorForNodes.PointToTuple(_geomGraph.LeftBottom, p, GetGridSize()); TileStatistic ts; if (tileTableForStatistic.TryGetValue(t, out ts)) return ts; tileTableForStatistic[t] = ts = new TileStatistic {rails = 0, vertices = 0}; return ts; }