Changeset 1235 in josm for trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
- Timestamp:
- 2009-01-10T20:51:48+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
r1221 r1235 76 76 */ 77 77 public void visit(Node n) { 78 // check, if the node is visible at all 79 Point p = nc.getPoint(n.eastNorth); 80 if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return; 81 78 82 IconElemStyle nodeStyle = (IconElemStyle)styles.get(n); 79 83 if (nodeStyle != null && isZoomOk(nodeStyle)) … … 95 99 return; 96 100 101 // check, if the way is visible at all 102 Polygon polygon = new Polygon(); 103 for (Node n : w.nodes) 104 { 105 Point p = nc.getPoint(n.eastNorth); 106 polygon.addPoint(p.x,p.y); 107 } 108 if(!isPolygonVisible(polygon)) 109 return; 110 97 111 ElemStyle wayStyle = styles.get(w); 98 112 … … 104 118 if(wayStyle!=null) 105 119 { 106 boolean area = false;107 120 if(wayStyle instanceof LineElemStyle) 108 121 l = (LineElemStyle)wayStyle; … … 111 124 areacolor = ((AreaElemStyle)wayStyle).color; 112 125 l = ((AreaElemStyle)wayStyle).line; 113 area = true; 114 } 115 if (area && fillAreas) 116 drawWayAsArea(w, areacolor); 126 if (fillAreas) 127 drawWayAsArea(w, areacolor); 128 } 117 129 } 118 130 … … 129 141 int realWidth = 0; //the real width of the element in meters 130 142 boolean dashed = false; 143 Node lastN; 131 144 132 145 if(l != null) … … 147 160 color = selectedColor; 148 161 149 Node lastN;162 // draw overlays under the way 150 163 if(l != null && l.overlays != null) 151 164 { … … 168 181 } 169 182 183 // draw the way 170 184 lastN = null; 171 185 for(Node n : w.nodes) … … 176 190 } 177 191 192 // draw overlays above the way 178 193 if(l != null && l.overlays != null) 179 194 { … … 799 814 alreadyDrawnAreas = new LinkedList<Way>(); 800 815 selectedCall = false; 801 816 817 // update the style name, just in case the user changed it in the meantime 818 styles.updateStyleName(); 819 802 820 if(profiler) 803 821 {
Note:
See TracChangeset
for help on using the changeset viewer.