public class RasterImage extends Object
Constructor and Description |
---|
RasterImage(ImageBuffer surface,
Media rasterFile,
int rasterHeight,
boolean smooth)
Create a rastered image.
|
RasterImage(Media media,
Media rasterFile,
int rasterHeight,
boolean smooth)
Create a rastered image.
|
Modifier and Type | Method and Description |
---|---|
Media |
getFile()
Get the raster file.
|
int |
getHeight()
Get the raster height.
|
ImageBuffer |
getRaster(int id)
Get the raster from its ID.
|
List<ImageBuffer> |
getRasters()
Get all rasters.
|
boolean |
hasSmooth()
Check if smooth raster.
|
void |
loadRasters(int imageHeight)
Load rasters.
|
void |
loadRasters(int imageHeight,
boolean save,
String prefix)
Load rasters.
|
public RasterImage(Media media, Media rasterFile, int rasterHeight, boolean smooth)
media
- The image media.rasterFile
- The raster media.rasterHeight
- The height used by the raster (must be strictly superior to 0).smooth
- true
for smoothed raster, false
else.LionEngineException
- If invalid media or raster file or height.public RasterImage(ImageBuffer surface, Media rasterFile, int rasterHeight, boolean smooth)
surface
- The surface reference.rasterFile
- The raster media.rasterHeight
- The height used by the raster (must be strictly superior to 0).smooth
- true
for smoothed raster, false
else.LionEngineException
- If invalid media or raster file or height.public void loadRasters(int imageHeight)
imageHeight
- The local image height.LionEngineException
- If the raster data from the media are invalid.public void loadRasters(int imageHeight, boolean save, String prefix)
imageHeight
- The local image height.save
- true
to save generated (if) rasters, false
else.prefix
- The folder prefix (if save is true
).LionEngineException
- If the raster data from the media are invalid.public Media getFile()
public List<ImageBuffer> getRasters()
public ImageBuffer getRaster(int id)
id
- The raster ID (must be superior or equal to 0).public int getHeight()
public boolean hasSmooth()
true
if smooth enabled, false
else.Copyright © 2017 Byron 3D Games Studio. All rights reserved.