예제 #1
0
        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);
        }
예제 #2
0
        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;
        }