Changeset 6172 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2013-08-21T18:15:12+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r6162 r6172 6 6 import java.awt.Color; 7 7 import java.awt.Component; 8 import java.awt.Dimension; 8 9 import java.awt.Font; 9 10 import java.awt.FontMetrics; … … 29 30 import java.util.Iterator; 30 31 import java.util.List; 32 31 33 import javax.swing.AbstractButton; 32 34 import javax.swing.FocusManager; 33 import javax.swing.ImageIcon;34 35 35 36 import org.openstreetmap.josm.Main; … … 904 905 905 906 public void drawRestriction(Image img, Point pVia, double vx, double vx2, double vy, double vy2, double angle, boolean selected) { 906 /* rotate image with direction last node in from to */ 907 Image rotatedImg = ImageProvider.createRotatedImage(null , img, angle); 908 909 /* scale down image to 16*16 pixels */ 910 Image smallImg = new ImageIcon(rotatedImg.getScaledInstance(16 , 16, Image.SCALE_SMOOTH)).getImage(); 907 // rotate image with direction last node in from to, and scale down image to 16*16 pixels 908 Image smallImg = ImageProvider.createRotatedImage(img, angle, new Dimension(16, 16)); 911 909 int w = smallImg.getWidth(null), h=smallImg.getHeight(null); 912 910 g.drawImage(smallImg, (int)(pVia.x+vx+vx2)-w/2, (int)(pVia.y+vy+vy2)-h/2, nc);
Note:
See TracChangeset
for help on using the changeset viewer.