Class RenderingHelper
java.lang.Object
org.openstreetmap.josm.gui.mappaint.RenderingHelper
Class to render osm data to a file.
- Since:
- 12963
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classData class to save style settings along with the corresponding style URL. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Colorprivate final Boundsprivate PrintStreamprivate final DataSetprivate booleanprivate Stringprivate final ProjectionBoundsprivate final doubleprivate final Collection<RenderingHelper.StyleData> -
Constructor Summary
ConstructorsConstructorDescriptionRenderingHelper(DataSet ds, Bounds bounds, double scale, Collection<RenderingHelper.StyleData> styles) Construct a newRenderingHelper. -
Method Summary
Modifier and TypeMethodDescription(package private) Dimensionrender()Invoke the renderer.voidsetBackgroundColor(Color backgroundColor) Set the background color to use for rendering.(package private) voidsetDebugStream(PrintStream debugStream) voidsetFillBackground(boolean fillBackground) Decide if background should be filled or left transparent.(package private) voidSet a prefix for rendering style defaults.
-
Field Details
-
ds
-
bounds
-
projBounds
-
scale
-
styles
-
backgroundColor
-
fillBackground
-
prefix
-
debugStream
-
-
Constructor Details
-
RenderingHelper
public RenderingHelper(DataSet ds, Bounds bounds, double scale, 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 Details
-
setBackgroundColor
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
Decide if background should be filled or left transparent.- Parameters:
fillBackground- true, if background should be filled- Since:
- 12966
- See Also:
-
getImageSize
-
render
Invoke the renderer.- Returns:
- the rendered image
- Throws:
IOException- in case of an IOExceptionIllegalDataException- when illegal data is encountered (style has errors, etc.)
-
setDebugStream
-
setPrefix
Set a prefix for rendering style defaults.- Parameters:
prefix- the option prefix used when accessing style settings, should be lowercase with a dot at the end- Since:
- 19589
-