public class RenderingHelper extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RenderingHelper.StyleData
Data class to save style settings along with the corresponding style URL.
|
Modifier and Type | Field and Description |
---|---|
private java.awt.Color |
backgroundColor |
private Bounds |
bounds |
private DataSet |
ds |
private boolean |
fillBackground |
private ProjectionBounds |
projBounds |
private double |
scale |
private java.util.Collection<RenderingHelper.StyleData> |
styles |
Constructor and Description |
---|
RenderingHelper(DataSet ds,
Bounds bounds,
double scale,
java.util.Collection<RenderingHelper.StyleData> styles)
Construct a new
RenderingHelper . |
Modifier and Type | Method and Description |
---|---|
(package private) java.awt.Dimension |
getImageSize() |
java.awt.image.BufferedImage |
render()
Invoke the renderer.
|
void |
setBackgroundColor(java.awt.Color backgroundColor)
Set the background color to use for rendering.
|
void |
setFillBackground(boolean fillBackground)
Decide if background should be filled or left transparent.
|
private final ProjectionBounds projBounds
private final double scale
private final java.util.Collection<RenderingHelper.StyleData> styles
private java.awt.Color backgroundColor
private boolean fillBackground
public RenderingHelper(DataSet ds, Bounds bounds, double scale, java.util.Collection<RenderingHelper.StyleData> styles)
RenderingHelper
.ds
- the dataset to renderbounds
- the bounds of the are to renderscale
- the scale to render at (east/north units per pixel)styles
- the styles to use for renderingpublic void setBackgroundColor(java.awt.Color backgroundColor)
backgroundColor
- the background color to use, means
to determine the background color automatically from the stylesetFillBackground(boolean)
public void setFillBackground(boolean fillBackground)
fillBackground
- true, if background should be filledsetBackgroundColor(java.awt.Color)
java.awt.Dimension getImageSize()
public java.awt.image.BufferedImage render() throws java.io.IOException, IllegalDataException
java.io.IOException
- in case of an IOExceptionIllegalDataException
- when illegal data is encountered (style has errors, etc.)