- Timestamp:
- 2017-03-05T00:23:56+01:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r11671 r11674 949 949 * @param member {@code} true to render it as a relation member, {@code false} otherwise 950 950 * @param theta the angle of rotation in radians 951 * @since 11670 951 952 */ 952 953 public void drawAreaIcon(OsmPrimitive primitive, MapImage img, boolean disabled, boolean selected, boolean member, double theta) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/AreaElement.java
r11670 r11674 62 62 private final MapImage iconImage; 63 63 64 /** 65 * The rotation of the {@link #iconImageAngle} 66 */ 64 67 private final RotationAngle iconImageAngle; 65 68 … … 175 178 Objects.equals(text, that.text) && 176 179 Objects.equals(extent, that.extent) && 177 Objects.equals(extentThreshold, that.extentThreshold); 180 Objects.equals(extentThreshold, that.extentThreshold) && 181 Objects.equals(iconImage, that.iconImage) && 182 Objects.equals(iconImageAngle, that.iconImageAngle); 178 183 } 179 184 180 185 @Override 181 186 public int hashCode() { 182 return Objects.hash(super.hashCode(), color, fillImage, text, extent, extentThreshold );187 return Objects.hash(super.hashCode(), color, fillImage, text, extent, extentThreshold, iconImage, iconImageAngle); 183 188 } 184 189 … … 186 191 public String toString() { 187 192 return "AreaElemStyle{" + super.toString() + "color=" + Utils.toString(color) + 188 " fillImage=[" + fillImage + "] }";193 " fillImage=[" + fillImage + "] iconImage=[" + iconImage + "] iconImageAngle=[" + iconImageAngle + "]}"; 189 194 } 190 195 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/styleelement/NodeElement.java
r11670 r11674 33 33 */ 34 34 public class NodeElement extends StyleElement { 35 /** 36 * The image that is used to display this node. May be <code>null</code> 37 */ 35 38 public final MapImage mapImage; 39 /** 40 * The angle that is used to rotate {@link #mapImage}. May be <code>null</code> to indicate no rotation. 41 */ 36 42 public final RotationAngle mapImageAngle; 37 43 /** … … 63 69 } 64 70 71 /** 72 * Creates a new node element for the given Environment 73 * @param env The environment 74 * @return The node element style or <code>null</code> if the node should not be painted. 75 */ 65 76 public static NodeElement create(Environment env) { 66 77 return create(env, 4f, false); … … 90 101 * @param env The environment 91 102 * @return The angle 103 * @since 11670 92 104 */ 93 105 public static RotationAngle createRotationAngle(Environment env) { … … 115 127 } 116 128 129 /** 130 * Create a map icon for the environment using the default keys. 131 * @param env The environment to read the icon form 132 * @return The icon or <code>null</code> if no icon is defined 133 * @since 11670 134 */ 117 135 public static MapImage createIcon(final Environment env) { 118 136 return createIcon(env, ICON_KEYS); 119 137 } 120 138 139 /** 140 * Create a map icon for the environment. 141 * @param env The environment to read the icon form 142 * @param keys The keys, indexed by the ICON_..._IDX constants. 143 * @return The icon or <code>null</code> if no icon is defined 144 */ 121 145 public static MapImage createIcon(final Environment env, final String ... keys) { 122 146 CheckParameterUtil.ensureParameterNotNull(env, "env"); … … 168 192 } 169 193 194 /** 195 * Create a symbol for the environment 196 * @param env The environment to read the icon form 197 * @return The symbol. 198 */ 170 199 private static Symbol createSymbol(Environment env) { 171 200 Cascade c = env.mc.getCascade(env.layer); … … 303 332 } 304 333 334 /** 335 * Gets the selection box for this element. 336 * @return The selection box as {@link BoxProvider} object. 337 */ 305 338 public BoxProvider getBoxProvider() { 306 339 if (mapImage != null)
Note:
See TracChangeset
for help on using the changeset viewer.