- Timestamp:
- 2011-08-13T19:51:31+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r4087 r4316 202 202 @Override 203 203 public void render(final DataSet data, boolean renderVirtualNodes, Bounds bounds) { 204 //long start = System.currentTimeMillis();204 long start = System.currentTimeMillis(); 205 205 BBox bbox = new BBox(bounds); 206 206 … … 226 226 collectWayStyles(data, sc, bbox); 227 227 collectRelationStyles(data, sc, bbox); 228 //long phase1 = System.currentTimeMillis();228 long phase1 = System.currentTimeMillis(); 229 229 sc.drawAll(); 230 230 sc = null; 231 231 painter.drawVirtualNodes(data.searchWays(bbox)); 232 232 233 //long now = System.currentTimeMillis();234 //System.err.println(String.format("PAINTING TOOK %d [PHASE1 took %d] (at scale %s)", now - start, phase1 - start, circum));233 long now = System.currentTimeMillis(); 234 System.err.println(String.format("PAINTING TOOK %d [PHASE1 took %d] (at scale %s)", now - start, phase1 - start, circum)); 235 235 } 236 236 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
r4305 r4316 33 33 public Color color; 34 34 public Color dashesBackground; 35 public int offset; 35 36 public float realWidth; // the real width of this line in meter 36 37 37 38 private BasicStroke dashesLine; 38 39 39 protected LineElemStyle(Cascade c, BasicStroke line, Color color, BasicStroke dashesLine, Color dashesBackground, float realWidth) {40 protected LineElemStyle(Cascade c, BasicStroke line, Color color, BasicStroke dashesLine, Color dashesBackground, int offset, float realWidth) { 40 41 super(c, 0f); 41 42 this.line = line; … … 43 44 this.dashesLine = dashesLine; 44 45 this.dashesBackground = dashesBackground; 46 this.offset = offset; 45 47 this.realWidth = realWidth; 46 48 } … … 175 177 BasicStroke dashesLine = null; 176 178 179 float offset = c.get("offset", 0f, Float.class); 180 177 181 if (dashes != null && dashesBackground != null) { 178 182 float[] dashes2 = new float[dashes.length]; … … 182 186 } 183 187 184 return new LineElemStyle(c, line, color, dashesLine, dashesBackground, realWidth);188 return new LineElemStyle(c, line, color, dashesLine, dashesBackground, (int) offset, realWidth); 185 189 } 186 190 … … 228 232 } 229 233 230 painter.drawWay(w, myColor, myLine, myDashLine, myDashedColor, showOrientation,234 painter.drawWay(w, myColor, myLine, myDashLine, myDashedColor, offset, showOrientation, 231 235 showOnlyHeadArrowOnly, showOneway, onewayReversed); 232 236 … … 260 264 equal(dashesLine, other.dashesLine) && 261 265 equal(dashesBackground, other.dashesBackground) && 266 offset == other.offset && 262 267 realWidth == other.realWidth; 263 268 } … … 270 275 hash = 29 * hash + (dashesLine != null ? dashesLine.hashCode() : 0); 271 276 hash = 29 * hash + (dashesBackground != null ? dashesBackground.hashCode() : 0); 277 hash = 29 * hash + offset; 272 278 hash = 29 * hash + Float.floatToIntBits(realWidth); 273 279 return hash; … … 283 289 " linejoin=" + linejoinToString(line.getLineJoin()) + 284 290 " linecap=" + linecapToString(line.getEndCap()) + 291 (offset == 0 ? "" : " offset=" + offset) + 285 292 '}'; 286 293 }
Note:
See TracChangeset
for help on using the changeset viewer.