1 18 package org.apache.batik.ext.awt.image.rendered; 19 20 import java.awt.image.RenderedImage ; 21 22 public class TileCache { 23 private static LRUCache cache = new LRUCache(50); 24 25 public static void setSize(int sz) { cache.setSize(sz); } 26 27 public static TileStore getTileGrid(int minTileX, int minTileY, 28 int xSz, int ySz, TileGenerator src) { 29 return new TileGrid(minTileX, minTileY, xSz, ySz, src, cache); 30 } 31 32 public static TileStore getTileGrid(RenderedImage img, 33 TileGenerator src) { 34 return new TileGrid(img.getMinTileX(), img.getMinTileY(), 35 img.getNumXTiles(), img.getNumYTiles(), 36 src, cache); 37 } 38 public static TileStore getTileMap(TileGenerator src) { 39 return new TileMap(src, cache); 40 } 41 } 42 | Popular Tags |