Changeset 775 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-08-12T20:31:49+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r768 r775 86 86 87 87 private int unselectedNodeRadius; 88 89 private int taggedNodeRadius; 88 90 89 91 private int selectedNodeSize; … … 92 94 93 95 private int defaultSegmentWidth = 2; 96 private int taggedNodeSize; 94 97 95 98 public final static Color darkerblue = new Color(0,0,96); … … 144 147 if (n.selected) 145 148 drawNode(n, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode); 149 else if (n.tagged) 150 drawNode(n, nodeColor, taggedNodeSize, taggedNodeRadius, fillUnselectedNode); 146 151 else 147 152 drawNode(n, nodeColor, unselectedNodeSize, unselectedNodeRadius, fillUnselectedNode); … … 352 357 return; 353 358 g.setColor(color); 354 if (fill) 359 if (fill) { 355 360 g.fillRect(p.x - radius, p.y - radius, size, size); 356 else 361 g.drawRect(p.x - radius, p.y - radius, size, size); 362 } else 357 363 g.drawRect(p.x - radius, p.y - radius, size, size); 358 364 } … … 380 386 5) / 2; 381 387 selectedNodeSize = selectedNodeRadius * 2; 388 382 389 unselectedNodeRadius = Main.pref.getInteger( 383 390 "mappaint.node.unselected-size", 3) / 2; 384 391 unselectedNodeSize = unselectedNodeRadius * 2; 392 393 taggedNodeRadius = Main.pref.getInteger( 394 "mappaint.node.tagged-size", 5) / 2; 395 taggedNodeSize = taggedNodeRadius * 2; 385 396 386 397 defaultSegmentWidth = Main.pref.getInteger( -
trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java
r768 r775 86 86 87 87 Rectangle bbox = new Rectangle(); 88 private int taggedNodeRadius; 89 private int taggedNodeSize; 88 90 89 91 public void visitAll(DataSet data) { … … 107 109 unselectedNodeSize = unselectedNodeRadius * 2; 108 110 111 taggedNodeRadius = Main.pref.getInteger( 112 "mappaint.node.tagged-size", 5) / 2; 113 taggedNodeSize = taggedNodeRadius * 2; 114 109 115 defaultSegmentWidth = Main.pref.getInteger( 110 116 "mappaint.segment.default-width", 2); … … 161 167 else if (n.selected) 162 168 drawNode(n, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode); 163 else 169 else if(n.tagged) 170 drawNode(n, nodeColor, taggedNodeSize, taggedNodeRadius, fillUnselectedNode); 171 else 164 172 drawNode(n, nodeColor, unselectedNodeSize, unselectedNodeRadius, fillUnselectedNode); 165 173 } … … 276 284 return; 277 285 g.setColor(color); 278 if (fill) 286 if (fill) { 279 287 g.fillRect(p.x - radius, p.y - radius, size, size); 280 else 288 g.drawRect(p.x - radius, p.y - radius, size, size); 289 } else 281 290 g.drawRect(p.x - radius, p.y - radius, size, size); 282 291 } -
trunk/src/org/openstreetmap/josm/gui/MapView.java
r684 r775 86 86 private LinkedList<MapViewPaintable> temporaryLayers = new LinkedList<MapViewPaintable>(); 87 87 88 private BufferedImage offscreenBuffer; 89 88 90 /** 89 91 * The listener of the active layer changes. … … 204 206 if (center == null) 205 207 return; // no data loaded yet. 206 207 BufferedImage bim = new BufferedImage(getWidth(), getHeight(), Transparency.OPAQUE); 208 Graphics2D tempG = bim.createGraphics(); 208 209 // re-create offscreen-buffer if we've been resized, otherwise 210 // just re-use it. 211 if (null == offscreenBuffer || offscreenBuffer.getWidth() != getWidth() 212 || offscreenBuffer.getHeight() != getHeight()) 213 offscreenBuffer = new BufferedImage(getWidth(), getHeight(), 214 BufferedImage.TYPE_INT_ARGB); 215 216 Graphics2D tempG = offscreenBuffer.createGraphics(); 209 217 tempG.setColor(Preferences.getPreferencesColor("background", Color.BLACK)); 210 218 tempG.fillRect(0, 0, getWidth(), getHeight()); … … 238 246 playHeadMarker.paint(tempG, this); 239 247 240 g.drawImage( bim, 0, 0, null);248 g.drawImage(offscreenBuffer, 0, 0, null); 241 249 super.paint(g); 242 250 }
Note:
See TracChangeset
for help on using the changeset viewer.