Changeset 631 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-05-11T03:05:11+02:00 (17 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r627 r631 182 182 } 183 183 orderNumber++; 184 // drawSegment(lastN, n, w.selected && !inactive ? selectedColor : wayColor, showDirectionArrow); 185 186 if (area && fillAreas) 187 //Draw segments in a different colour so direction arrows show against the fill188 drawSeg(lastN, n, w.selected ? selectedColor : untaggedColor, showDirection, width, true);189 else190 if (area) 184 185 if (area && fillAreas) { 186 // hack to make direction arrows visible against filled background 187 if (showDirection) 188 drawSeg(lastN, n, w.selected ? selectedColor : untaggedColor, showDirection, width, true); 189 } else { 190 if (area) { 191 191 drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, true); 192 else193 if (realWidth > 0 && useRealWidth && !showDirection) {192 } else { 193 if (realWidth > 0 && useRealWidth && !showDirection) { 194 194 int tmpWidth = (int) (100 / (float) (circum / realWidth)); 195 195 if (tmpWidth > width) width = tmpWidth; 196 196 } 197 } 198 } 197 199 198 200 drawSeg(lastN, n, w.selected ? selectedColor : colour, showDirection, width, dashed); -
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r628 r631 10 10 import java.awt.Graphics; 11 11 import java.awt.GridBagLayout; 12 import java.awt.image.BufferedImage; 12 13 import java.awt.Point; 14 import java.awt.Transparency; 13 15 import java.awt.event.ActionEvent; 16 import java.awt.image.BufferedImage; 14 17 import java.io.File; 15 18 import java.util.Collection; … … 172 175 else 173 176 { 174 standardMapPainter.setGraphics(g); 175 standardMapPainter.setNavigatableComponent(mv); 176 standardMapPainter.inactive = inactive; 177 standardMapPainter.visitAll(data); 177 // MapPaintVisitor paints calls fillPolygon() with an alpha 178 // channel -- this is slow, speed it up by rendering to a BufferedImage: 179 BufferedImage bim = new BufferedImage(mv.getWidth(), mv.getHeight(), Transparency.OPAQUE); 180 standardMapPainter.setGraphics(bim.createGraphics()); 181 standardMapPainter.setNavigatableComponent(mv); 182 standardMapPainter.inactive = inactive; 183 standardMapPainter.visitAll(data); 184 g.drawImage(bim, 0, 0, null); 178 185 } 179 186 Main.map.conflictDialog.paintConflicts(g, mv);
Note:
See TracChangeset
for help on using the changeset viewer.