Changeset 6296 in josm for trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
- Timestamp:
- 2013-10-04T03:27:01+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm/visitor/paint
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
r6248 r6296 498 498 } else { 499 499 TexturePaint texture = new TexturePaint(fillImage.getImage(), 500 // new Rectangle(polygon.xpoints[0], polygon.ypoints[0], fillImage.getWidth(), fillImage.getHeight()));501 500 new Rectangle(0, 0, fillImage.getWidth(), fillImage.getHeight())); 502 501 g.setPaint(texture); … … 511 510 512 511 if (text != null && isShowNames()) { 513 /* 514 * abort if we can't compose the label to be rendered 515 */ 512 // abort if we can't compose the label to be rendered 516 513 if (text.labelCompositionStrategy == null) return; 517 514 String name = text.labelCompositionStrategy.compose(osm); … … 522 519 Rectangle2D nb = fontMetrics.getStringBounds(name, g); // if slow, approximate by strlen()*maxcharbounds(font) 523 520 524 // Point2D c = getCentroid(polygon);525 521 // Using the Centroid is Nicer for buildings like: +--------+ 526 522 // but this needs to be fast. As most houses are | 42 | … … 528 524 // will have to do. ++ 529 525 // Centroids are not optimal either, just imagine a U-shaped house. 530 // Point2D c = new Point2D.Double(pb.x + pb.width / 2.0, pb.y + pb.height / 2.0);531 // Rectangle2D.Double centeredNBounds =532 // new Rectangle2D.Double(c.getX() - nb.getWidth()/2,533 // c.getY() - nb.getHeight()/2,534 // nb.getWidth(),535 // nb.getHeight());536 526 537 527 Rectangle centeredNBounds = new Rectangle(pb.x + (int)((pb.width - nb.getWidth())/2.0), -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/relations/Multipolygon.java
r6248 r6296 488 488 } 489 489 } 490 } /* for(i = ... */491 } /* while(joined) */490 } 491 } 492 492 493 493 if (nodes == null) { … … 497 497 498 498 result.add(new JoinedWay(nodes, wayIds, selected)); 499 } /* while(left != 0) */499 } 500 500 501 501 return result; … … 575 575 return innerWays; 576 576 } 577 /* 578 public List<PolyData> getInnerPolygons() { 579 return innerPolygons; 580 } 581 582 public List<PolyData> getOuterPolygons() { 583 return outerPolygons; 584 } 585 */ 577 586 578 public List<PolyData> getCombinedPolygons() { 587 579 return combinedPolygons;
Note:
See TracChangeset
for help on using the changeset viewer.