Ignore:
Timestamp:
2017-04-19T22:25:12+02:00 (7 years ago)
Author:
bastiK
Message:

see #7427 - avoid black lines at tile borders (primarily for native tiles)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r11958 r11961  
    965965        }
    966966        g.drawImage(toDrawImg, (int) Math.round(screen0.getX()), (int) Math.round(screen0.getY()),
    967                 (int) Math.round(screen1.getX() - screen0.getX()), (int) Math.round(screen1.getY() - screen0.getY()), this);
     967                (int) Math.round(screen1.getX()) - (int) Math.round(screen0.getX()),
     968                (int) Math.round(screen1.getY()) - (int) Math.round(screen0.getY()), this);
    968969        if (clip != null) {
    969970            g.setClip(oldClip);
     
    10271028    private List<Tile> paintTileImages(Graphics2D g, TileSet ts, int zoom, Tile border) {
    10281029        if (zoom <= 0) return Collections.emptyList();
    1029         Shape borderClip = coordinateConverter.getScreenQuadrilateralForTile(border);
     1030        Shape borderClip = coordinateConverter.getTileShapeScreen(border);
    10301031        List<Tile> missedTiles = new LinkedList<>();
    10311032        // The callers of this code *require* that we return any tiles that we do not draw in missedTiles.
     
    11401141            // draw tile outline in semi-transparent red
    11411142            g.setColor(new Color(255, 0, 0, 50));
    1142             g.draw(coordinateConverter.getScreenQuadrilateralForTile(tile));
     1143            g.draw(coordinateConverter.getTileShapeScreen(tile));
    11431144        }
    11441145    }
Note: See TracChangeset for help on using the changeset viewer.