Class ImageLayout.FixedSize

java.lang.Object
org.apache.sis.internal.coverage.j2d.ImageLayout
org.apache.sis.internal.coverage.j2d.ImageLayout.FixedSize
Enclosing class:
ImageLayout

private static final class ImageLayout.FixedSize extends ImageLayout
Override preferred tile size with a fixed size.
  • Field Details

    • xmin

      private final int xmin
      Indices of the first tile.
    • ymin

      private final int ymin
      Indices of the first tile.
  • Constructor Details

    • FixedSize

      FixedSize(RenderedImage source)
      Creates a new layout with exactly the tile size of given image.
  • Method Details

    • suggestTileSize

      public Dimension suggestTileSize(int imageWidth, int imageHeight, boolean allowPartialTiles)
      Returns the fixed tile size. All parameters are ignored.
      Overrides:
      suggestTileSize in class ImageLayout
      Parameters:
      imageWidth - the image width in pixels.
      imageHeight - the image height in pixels.
      allowPartialTiles - whether to allow tiles that are only partially filled.
      Returns:
      suggested tile size for the given image size.
    • suggestTileSize

      public Dimension suggestTileSize(RenderedImage image, Rectangle bounds, boolean allowPartialTiles)
      Returns the fixed tile size. All parameters are ignored.
      Overrides:
      suggestTileSize in class ImageLayout
      Parameters:
      image - the image for which to derive a tile size, or null.
      bounds - the bounds of the image to create, or null if same as image.
      allowPartialTiles - whether to allow tiles that are only partially filled. This argument is ignored (reset to false) if the given image is opaque.
      Returns:
      suggested tile size for the given image.
    • getMinTile

      public Point getMinTile()
      Returns indices of the first tile.
      Overrides:
      getMinTile in class ImageLayout
      Returns:
      indices of the first tile (minTileX, minTileY), or null for (0,0).