Class RenderingHelper


  • public class RenderingHelper
    extends java.lang.Object
    Class to render osm data to a file.
    Since:
    12963
    • Constructor Detail

      • RenderingHelper

        public RenderingHelper​(DataSet ds,
                               Bounds bounds,
                               double scale,
                               java.util.Collection<RenderingHelper.StyleData> styles)
        Construct a new RenderingHelper.
        Parameters:
        ds - the dataset to render
        bounds - the bounds of the are to render
        scale - 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)
      • 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 IOException
        IllegalDataException - when illegal data is encountered (style has errors, etc.)
      • setDebugStream

        void setDebugStream​(java.io.PrintStream debugStream)
      • setPrefix

        void setPrefix​(java.lang.String prefix)
        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