- Timestamp:
- 2018-04-24T22:52:33+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r13673 r13676 899 899 } 900 900 901 public void drawRestriction(Image img, Point pVia, double vx, double vx2, double vy, double vy2, double angle, boolean selected) { 901 /** 902 * Draws a restriction. 903 * @param img symbol image 904 * @param pVia "via" node 905 * @param vx X offset 906 * @param vy Y offset 907 * @param angle the rotated angle, in degree, clockwise 908 * @param selected if true, draws a selection rectangle 909 * @since 13676 910 */ 911 public void drawRestriction(Image img, Point pVia, double vx, double vy, double angle, boolean selected) { 902 912 // rotate image with direction last node in from to, and scale down image to 16*16 pixels 903 913 Image smallImg = ImageProvider.createRotatedImage(img, angle, new Dimension(16, 16)); 904 914 int w = smallImg.getWidth(null), h = smallImg.getHeight(null); 905 g.drawImage(smallImg, (int) (pVia.x+vx +vx2)-w/2, (int) (pVia.y+vy+vy2)-h/2, nc);915 g.drawImage(smallImg, (int) (pVia.x+vx)-w/2, (int) (pVia.y+vy)-h/2, nc); 906 916 907 917 if (selected) { 908 918 g.setColor(isInactiveMode ? inactiveColor : relationSelectedColor); 909 g.drawRect((int) (pVia.x+vx +vx2)-w/2-2, (int) (pVia.y+vy+vy2)-h/2-2, w+4, h+4);919 g.drawRect((int) (pVia.x+vx)-w/2-2, (int) (pVia.y+vy)-h/2-2, w+4, h+4); 910 920 } 911 921 } … … 1082 1092 1083 1093 drawRestriction(icon.getImage(disabled), 1084 pVia, vx , vx2, vy,vy2, iconAngle, r.isSelected());1094 pVia, vx+vx2, vy+vy2, iconAngle, r.isSelected()); 1085 1095 } 1086 1096 … … 1551 1561 * @param checkOuterMember <code>true</code> if we should also add {@link #FLAG_OUTERMEMBER_OF_SELECTED} 1552 1562 * @return The flag. 1553 */ 1554 public static int computeFlags(OsmPrimitive primitive, boolean checkOuterMember) { 1563 * @since 13676 (signature) 1564 */ 1565 public static int computeFlags(IPrimitive primitive, boolean checkOuterMember) { 1555 1566 if (primitive.isDisabled()) { 1556 1567 return FLAG_DISABLED;
Note: See TracChangeset
for help on using the changeset viewer.