Class RenderingHelper
- java.lang.Object
-
- org.openstreetmap.josm.gui.mappaint.RenderingHelper
-
public class RenderingHelper extends java.lang.Object
Class to render osm data to a file.- Since:
- 12963
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRenderingHelper.StyleDataData class to save style settings along with the corresponding style URL.
-
Field Summary
Fields Modifier and Type Field Description private java.awt.ColorbackgroundColorprivate Boundsboundsprivate java.io.PrintStreamdebugStreamprivate DataSetdsprivate booleanfillBackgroundprivate ProjectionBoundsprojBoundsprivate doublescaleprivate java.util.Collection<RenderingHelper.StyleData>styles
-
Constructor Summary
Constructors Constructor Description RenderingHelper(DataSet ds, Bounds bounds, double scale, java.util.Collection<RenderingHelper.StyleData> styles)Construct a newRenderingHelper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.awt.DimensiongetImageSize()java.awt.image.BufferedImagerender()Invoke the renderer.voidsetBackgroundColor(java.awt.Color backgroundColor)Set the background color to use for rendering.(package private) voidsetDebugStream(java.io.PrintStream debugStream)voidsetFillBackground(boolean fillBackground)Decide if background should be filled or left transparent.
-
-
-
Field Detail
-
projBounds
private final ProjectionBounds projBounds
-
scale
private final double scale
-
styles
private final java.util.Collection<RenderingHelper.StyleData> styles
-
backgroundColor
private java.awt.Color backgroundColor
-
fillBackground
private boolean fillBackground
-
debugStream
private java.io.PrintStream debugStream
-
-
Constructor Detail
-
RenderingHelper
public RenderingHelper(DataSet ds, Bounds bounds, double scale, java.util.Collection<RenderingHelper.StyleData> styles)
Construct a newRenderingHelper.- Parameters:
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 rendering
-
-
Method Detail
-
setBackgroundColor
public void setBackgroundColor(java.awt.Color backgroundColor)
Set the background color to use for rendering.- Parameters:
backgroundColor- the background color to use, means to determine the background color automatically from the style- Since:
- 12966
- See Also:
setFillBackground(boolean)
-
setFillBackground
public void setFillBackground(boolean fillBackground)
Decide if background should be filled or left transparent.- Parameters:
fillBackground- true, if background should be filled- Since:
- 12966
- See Also:
setBackgroundColor(java.awt.Color)
-
getImageSize
java.awt.Dimension getImageSize()
-
render
public java.awt.image.BufferedImage render() throws java.io.IOException, IllegalDataException
Invoke the renderer.- Returns:
- the rendered image
- Throws:
java.io.IOException- in case of an IOExceptionIllegalDataException- when illegal data is encountered (style has errors, etc.)
-
setDebugStream
void setDebugStream(java.io.PrintStream debugStream)
-
-