Changeset 2987 in josm
- Timestamp:
- 2010-02-14T20:23:18+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r2876 r2987 155 155 156 156 /** 157 * Wheather or not the java vm is openjdk 158 * We use this to work around openjdk bugs 159 */ 160 public static boolean isOpenjdk; 161 162 /** 157 163 * Set or clear (if passed <code>null</code>) the map. 158 164 */ … … 190 196 public Main() { 191 197 main = this; 192 // platform = determinePlatformHook();198 isOpenjdk = System.getProperty("java.vm.name").toUpperCase().indexOf("OPENJDK") != -1; 193 199 platform.startupHook(); 194 200 contentPane.add(panel, BorderLayout.CENTER); -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r2921 r2987 59 59 text.append(" MB allocated, but free)"); 60 60 text.append("\n"); 61 text.append("Java version: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor") + ", " + System.getProperty("os.name")); 61 text.append("Java version: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor") + ", " + System.getProperty("java.vm.name")); 62 text.append("\n"); 63 text.append("Operating system: "+ System.getProperty("os.name")); 62 64 text.append("\n\n"); 63 65 DataSet dataset = Main.main.getCurrentDataSet(); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java
r2890 r2987 131 131 132 132 private void drawSegment(GeneralPath path, Point p1, Point p2, boolean showDirection, boolean reversedDirection) { 133 if (isSegmentVisible(p1, p2)) { 134 133 boolean drawIt = false; 134 if (Main.isOpenjdk) { 135 /** 136 * Work around openjdk bug. It leads to drawing artefacts when zooming in a lot. (#4289, #4424) 137 * (It looks like int overflow when clipping.) We do custom clipping. 138 */ 139 Rectangle bounds = g.getClipBounds(); 140 bounds.grow(100, 100); // avoid arrow heads at the border 141 LineClip clip = new LineClip(); 142 drawIt = clip.cohenSutherland(p1.x, p1.y, p2.x, p2.y, bounds.x, bounds.y, bounds.x+bounds.width, bounds.y+bounds.height); 143 p1 = clip.getP1(); 144 p2 = clip.getP2(); 145 } else { 146 drawIt = isSegmentVisible(p1, p2); 147 } 148 if (drawIt) { 135 149 /* draw segment line */ 136 150 path.moveTo(p1.x, p1.y);
Note:
See TracChangeset
for help on using the changeset viewer.