protected List <VisibleTileInfo> GetVisibleTiles() { var transform = plotter.Viewport.Transform; Rect output = plotter.Viewport.Output; DataRect visible = plotter.Viewport.Visible; using (new DisposableTimer("GetVisibleTiles", false)) { var tileInfos = (from tile in tileProvider.GetTilesForRegion(TransformRegion(visible), tileProvider.Level) let visibleRect = Transform(tileProvider.GetTileBounds(tile)) let screenRect = visibleRect.ViewportToScreen(transform) where output.IntersectsWith(screenRect) select new VisibleTileInfo { Tile = tile, ScreenBounds = screenRect, VisibleBounds = visibleRect }).ToList(); return(tileInfos); } }
protected List <VisibleTileInfo> GetVisibleTiles() { var transform = plotter.Viewport.Transform; Rect output = plotter.Viewport.Output; DataRect visible = plotter.Viewport.Visible; var tileInfos = (from tile in tileProvider.GetTilesForRegion(TransformRegion(visible), tileProvider.Level) let visibleRect = Transform(tileProvider.GetTileBounds(tile)) let screenRect = visibleRect.ViewportToScreen(transform) where output.IntersectsWith(screenRect) select new VisibleTileInfo { Tile = tile, ScreenBounds = screenRect, VisibleBounds = visibleRect }).ToList(); if (tileInfos.Count > MapTileProvider.GetTotalTilesCount(tileProvider.Level)) { //Debugger.Break(); } return(tileInfos); }