Changeset 3964 in josm for trunk/src/org
- Timestamp:
- 2011-03-08T17:12:21+01:00 (14 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/MapPaintVisitor.java
r3895 r3964 104 104 105 105 circum = nc.getDist100Pixel(); 106 boolean drawArea = circum <= Main.pref.getInteger("mappaint.fillareas", 10000000) && !paintSettings.isOutlineOnly();106 boolean drawArea = circum <= Main.pref.getInteger("mappaint.fillareas", 10000000); 107 107 boolean drawMultipolygon = drawArea && Main.pref.getBoolean("mappaint.multipolygon", true); 108 108 styles.setDrawMultipolygon(drawMultipolygon); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapPainter.java
r3907 r3964 56 56 private final boolean showIcons; 57 57 58 private final boolean isOutlineOnly; 59 58 60 private final Color inactiveColor; 59 61 private final Color selectedColor; … … 87 89 this.showNames = settings.getShowNamesDistance() > circum; 88 90 this.showIcons = settings.getShowIconsDistance() > circum; 91 92 this.isOutlineOnly = settings.isOutlineOnly(); 89 93 90 94 this.inactiveColor = PaintColors.INACTIVE.get(); … … 498 502 protected void drawArea(OsmPrimitive osm, Polygon polygon, Color color, BufferedImage fillImage, float fillImageAlpha, TextElement text) { 499 503 500 if (fillImage == null) { 501 g.setColor(color); 502 g.fillPolygon(polygon); 503 } else { 504 TexturePaint texture = new TexturePaint(fillImage, 505 new Rectangle(polygon.xpoints[0], polygon.ypoints[0], fillImage.getWidth(), fillImage.getHeight())); 506 g.setPaint(texture); 507 if (fillImageAlpha != 1f) { 508 g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, fillImageAlpha)); 509 } 510 g.fill(polygon); 511 g.setPaintMode(); 504 if (!isOutlineOnly) { 505 if (fillImage == null) { 506 g.setColor(color); 507 g.fillPolygon(polygon); 508 } else { 509 TexturePaint texture = new TexturePaint(fillImage, 510 new Rectangle(polygon.xpoints[0], polygon.ypoints[0], fillImage.getWidth(), fillImage.getHeight())); 511 g.setPaint(texture); 512 if (fillImageAlpha != 1f) { 513 g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, fillImageAlpha)); 514 } 515 g.fill(polygon); 516 g.setPaintMode(); 517 } 512 518 } 513 519
Note:
See TracChangeset
for help on using the changeset viewer.