Ignore:
Timestamp:
2017-09-04T18:52:06+02:00 (2 years ago)
Author:
bastiK
Message:

see #9995 - fix blurry GUI-icons and map view for Java 9 HiDPI mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java

    r12620 r12722  
    8282import org.openstreetmap.josm.tools.JosmRuntimeException;
    8383import org.openstreetmap.josm.tools.Logging;
     84import org.openstreetmap.josm.tools.HiDPISupport;
    8485import org.openstreetmap.josm.tools.Utils;
    8586import org.openstreetmap.josm.tools.bugreport.BugReport;
     
    417418                }
    418419            } else {
    419                 TexturePaint texture = new TexturePaint(fillImage.getImage(disabled),
     420                Image img = fillImage.getImage(disabled);
     421                // TexturePaint requires BufferedImage -> get base image from
     422                // possible multi-resolution image
     423                img = HiDPISupport.getBaseImage(img);
     424                TexturePaint texture = new TexturePaint((BufferedImage) img,
    420425                        new Rectangle(0, 0, fillImage.getWidth(), fillImage.getHeight()));
    421426                g.setPaint(texture);
     
    657662        double startOffset = computeStartOffset(phase, repeat);
    658663
    659         BufferedImage image = pattern.getImage(disabled);
     664        Image image = pattern.getImage(disabled);
    660665
    661666        path.visitClippedLine(repeat, (inLineOffset, start, end, startIsOldEnd) -> {
     
    11501155        displayText(() -> {
    11511156            AffineTransform defaultTransform = g.getTransform();
    1152             g.setTransform(at);
     1157            g.transform(at);
    11531158            g.setFont(text.font);
    11541159            g.drawString(name, 0, 0);
Note: See TracChangeset for help on using the changeset viewer.