Class TileUtils


  • public class TileUtils
    extends Object
    Tile utilities and constants
    Since:
    3.2.0
    Author:
    osbornb
    • Field Detail

      • TILE_DP

        public static final int TILE_DP
        Displayed device-independent pixels
        See Also:
        Constant Field Values
      • TILE_PIXELS_DEFAULT

        public static final int TILE_PIXELS_DEFAULT
        Tile pixels for default dpi tiles
        See Also:
        Constant Field Values
      • TILE_PIXELS_HIGH

        public static final int TILE_PIXELS_HIGH
        Tile pixels for high dpi tiles
        See Also:
        Constant Field Values
    • Constructor Detail

      • TileUtils

        public TileUtils()
    • Method Detail

      • tileLength

        public static int tileLength​(float scale)
        Get the tile side (width and height) dimension based upon the scale
        Parameters:
        scale - scale
        Returns:
        default tile length
      • tileScale

        public static float tileScale​(int tileWidth,
                                      int tileHeight)
        Get the tile scale based upon the tile dimensions
        Parameters:
        tileWidth - tile width
        tileHeight - tile height
        Returns:
        tile scale
      • tileScale

        public static float tileScale​(int tileLength)
        Get the tile scale based upon the tile length (width or height)
        Parameters:
        tileLength - tile length (width or height)
        Returns:
        tile scale