Changeset 10842 in josm


Ignore:
Timestamp:
2016-08-18T19:51:12+02:00 (3 years ago)
Author:
Don-vip
Message:

fix #13375 - Fix icon rendering (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

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

    r10827 r10842  
    892892        double x = p.getInViewX();
    893893        double y = p.getInViewY();
    894         temporaryGraphics.translate(-x, -y);
     894        temporaryGraphics.translate(x, y);
    895895        temporaryGraphics.rotate(theta);
    896         temporaryGraphics.drawImage(img.getImage(disabled), w/2 + img.offsetX, h/2 + img.offsetY, nc);
     896        int drawX = -w/2 + img.offsetX;
     897        int drawY = -h/2 + img.offsetY;
     898        temporaryGraphics.drawImage(img.getImage(disabled), drawX, drawY, nc);
    897899        if (selected || member) {
    898900            Color color;
     
    904906                color = relationSelectedColor;
    905907            }
    906             g.setColor(color);
    907             g.draw(new Rectangle2D.Double(x - w/2 + img.offsetX - 2, y - h/2 + img.offsetY - 2, w + 4, h + 4));
     908            temporaryGraphics.setColor(color);
     909            temporaryGraphics.draw(new Rectangle2D.Double(drawX - 2, drawY - 2, w + 4, h + 4));
    908910        }
    909911    }
Note: See TracChangeset for help on using the changeset viewer.