Menu

Enable rendering hints in OSMLayer.renderCurrentMap(Projection...) and other graphics classes

Anonymous
2014-08-12
2014-08-14
  • Anonymous

    Anonymous - 2014-08-12

    Hi!

    Can you add something like:

    public void setAntialiasGraphics(Graphics2D g2d) {
           g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
           g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
        }
    

    and call it from renderCurrentMap(...):

        private boolean renderCurrentMap(Projection projection, RenderImage renderImageObj) {
            BufferedImage renderImage = renderImageObj.img;
            Graphics2D g = renderImage.createGraphics();
            setAntialiasGraphics(g);
            ...
    

    This will vastly increase the legibility of more complicated/busy maps and make it look nicer in the process - or if you don't want it on by default, at least have it as an option in the app settings

    Thanks!

    g0tai

     
  • Andrew Pavlin

    Andrew Pavlin - 2014-08-14

    Looks good. These changes will be in build 42.

     

Anonymous
Anonymous

Add attachments
Cancel