Changeset 34618 in osm for applications/editors
- Timestamp:
- 2018-09-03T21:16:12+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMode.java
r33776 r34618 154 154 g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); 155 155 g.setStroke(new BasicStroke(2.0f)); 156 if (p2 ==null)156 if (p2 == null) 157 157 p2 = p1; 158 158 double length = Math.sqrt((p2.x-p1.x)*(p2.x-p1.x)+(p2.y-p1.y)*(p2.y-p1.y)); … … 164 164 165 165 Path2D path = new Path2D.Double(); 166 path.append(new Line2D.Double(p1.x+ofsX, p1.y+ofsY, p2.x+ofsX, p2.y+ofsY), false);167 path.append(new Arc2D.Double(p2.x-radius, p2.y-radius, radius*2, radius*2,166 path.append(new Line2D.Double(p1.x+ofsX, p1.y+ofsY, p2.x+ofsX, p2.y+ofsY), false); 167 path.append(new Arc2D.Double(p2.x-radius, p2.y-radius, radius*2, radius*2, 168 168 Math.toDegrees(angle), -180, Arc2D.OPEN), true); 169 path.append(new Line2D.Double(p2.x-ofsX, p2.y-ofsY, p1.x-ofsX, p1.y-ofsY), true);170 path.append(new Arc2D.Double(p1.x-radius, p1.y-radius, radius*2, radius*2,169 path.append(new Line2D.Double(p2.x-ofsX, p2.y-ofsY, p1.x-ofsX, p1.y-ofsY), true); 170 path.append(new Arc2D.Double(p1.x-radius, p1.y-radius, radius*2, radius*2, 171 171 Math.toDegrees(angle)-180, -180, Arc2D.OPEN), true); 172 172 path.closePath(); … … 176 176 g.setXORMode(Color.BLACK); 177 177 g.setColor(Color.WHITE); 178 g.drawOval(Math.round(p2.x-radius), Math.round(p2.y-radius), 179 Math.round(radius*2), Math.round(radius*2)); 178 g.drawOval(p2.x-radius, p2.y-radius, radius*2, radius*2); 180 179 } catch (InternalError e) { 181 180 // Robustness against Java bug https://bugs.openjdk.java.net/browse/JDK-8041647 182 181 Logging.error(e); 183 Logging.error("Java bug JDK-8041647 occured. To avoid this bug, please consult https://bugs.openjdk.java.net/browse/JDK-8041647." 182 Logging.error( 183 "Java bug JDK-8041647 occured. To avoid this bug, please consult https://bugs.openjdk.java.net/browse/JDK-8041647." 184 184 +" If the bug is fixed, please update your Java Runtime Environment."); 185 185 }
Note:
See TracChangeset
for help on using the changeset viewer.