コード例 #1
0
ファイル: VisualTile.cs プロジェクト: Jlinc/Test_SurfaceWPF
 public VisualTile(Tile tile, MultiScaleTileSource tileSource)
 {
     ZIndex = tile.Level;
     Scale = 1 / tileSource.ScaleAtLevel(tile.Level);
     var position = tileSource.GetTilePosition(tile.Column, tile.Row);
     Left = position.X * Scale;
     Top = position.Y * Scale;
 }
コード例 #2
0
        // Note: This uses an int because ZoomableCanvas uses ints to determine visible tiles.
        // Even though, you can store an image with more than 45000*45000 tiles on the last level.
        // It's possible to overflow this limit with huge sparse images that are close to the
        // 4 billion pixel limit from DeepZoom Composer.
        internal int GetTileIndex(Tile tile)
        {
            var rowsAtLevel = RowsAtLevel(tile.Level);
            var columnsAtLevel = ColumnsAtLevel(tile.Level);

            var levelOffset = LevelOffset(tile.Level);

            if (columnsAtLevel > rowsAtLevel)
                return levelOffset + columnsAtLevel * tile.Row + tile.Column;
            else
                return levelOffset + rowsAtLevel * tile.Column + tile.Row;
        }
コード例 #3
0
ファイル: VisualTile.cs プロジェクト: Jlinc/Test_SurfaceWPF
 public VisualTile(Tile tile, MultiScaleTileSource tileSource, ImageSource source)
     : this(tile, tileSource)
 {
     Source = source;
 }