Class ImageLayout.FixedSize
java.lang.Object
org.apache.sis.internal.coverage.j2d.ImageLayout
org.apache.sis.internal.coverage.j2d.ImageLayout.FixedSize
- Enclosing class:
ImageLayout
Override preferred tile size with a fixed size.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Indices of the first tile.private final int
Indices of the first tile.Fields inherited from class org.apache.sis.internal.coverage.j2d.ImageLayout
DEFAULT, isBoundsAdjustmentAllowed, SIZE_ADJUST
-
Constructor Summary
ConstructorsConstructorDescriptionFixedSize
(RenderedImage source) Creates a new layout with exactly the tile size of given image. -
Method Summary
Modifier and TypeMethodDescriptionReturns indices of the first tile.suggestTileSize
(int imageWidth, int imageHeight, boolean allowPartialTiles) Returns the fixed tile size.suggestTileSize
(RenderedImage image, Rectangle bounds, boolean allowPartialTiles) Returns the fixed tile size.Methods inherited from class org.apache.sis.internal.coverage.j2d.ImageLayout
createBandedSampleModel, createCompatibleSampleModel, fixedSize, getPreferredTileSize, toString
-
Field Details
-
xmin
private final int xminIndices of the first tile. -
ymin
private final int yminIndices 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
Returns the fixed tile size. All parameters are ignored.- Overrides:
suggestTileSize
in classImageLayout
- 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
Returns the fixed tile size. All parameters are ignored.- Overrides:
suggestTileSize
in classImageLayout
- Parameters:
image
- the image for which to derive a tile size, ornull
.bounds
- the bounds of the image to create, ornull
if same asimage
.allowPartialTiles
- whether to allow tiles that are only partially filled. This argument is ignored (reset tofalse
) if the given image is opaque.- Returns:
- suggested tile size for the given image.
-
getMinTile
Returns indices of the first tile.- Overrides:
getMinTile
in classImageLayout
- Returns:
- indices of the first tile (
minTileX
,minTileY
), ornull
for (0,0).
-