java.lang.Object
eu.svjatoslav.sixth.e3d.renderer.raster.texture.Texture

public class Texture extends Object
  • Field Details

  • Constructor Details

    • Texture

      public Texture(int width, int height, int maxUpscale)
  • Method Details

    • detectDownscaleFactorForZoom

      public int detectDownscaleFactorForZoom(double zoom)
    • detectUpscaleFactorForZoom

      public int detectUpscaleFactorForZoom(double zoom)
    • downscaleBitmap

      public TextureBitmap downscaleBitmap(TextureBitmap originalBitmap)
      Downscale given bitmap by factor of 2.
      Parameters:
      originalBitmap - Bitmap to downscale.
      Returns:
      Downscaled bitmap.
    • getDownscaledBitmap

      public TextureBitmap getDownscaledBitmap(int scaleFactor)
    • getUpscaledBitmap

      public TextureBitmap getUpscaledBitmap(int scaleFactor)
      Returns the bitmap that should be used for rendering at the given zoom
      Parameters:
      scaleFactor - The upscale factor
      Returns:
      The bitmap
    • getZoomedBitmap

      public TextureBitmap getZoomedBitmap(double zoomLevel)
      Returns the bitmap that should be used for rendering at the given zoom
      Parameters:
      zoomLevel - The zoom level
      Returns:
      The bitmap
    • resetResampledBitmapCache

      public void resetResampledBitmapCache()
      Resets the cache of resampled bitmaps
    • upscaleBitmap

      public TextureBitmap upscaleBitmap(TextureBitmap originalBitmap)
      Upscales the given bitmap by a factor of 2
      Parameters:
      originalBitmap - The bitmap to upscale
      Returns:
      The upscaled bitmap