Changeset 2808 in osm for applications/editors
- Timestamp:
- 2007-05-07T00:43:02+02:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mappaint/src/mappaint/MapPaintVisitor.java
r2807 r2808 181 181 if (ls.shown) return; 182 182 ls.shown=true; 183 Point p1 = nc.getPoint(ls.from.eastNorth); 184 Point p2 = nc.getPoint(ls.to.eastNorth); 185 // checking if this segment is visible 186 if ((p1.x < 0) && (p2.x < 0)) return ; 187 if ((p1.y < 0) && (p2.y < 0)) return ; 188 if ((p1.x > nc.getWidth()) && (p2.x > nc.getWidth())) return ; 189 if ((p1.y > nc.getHeight()) && (p2.y > nc.getHeight())) return ; 183 190 Graphics2D g2d = (Graphics2D)g; 184 191 if (ls.incomplete) … … 192 199 else 193 200 g2d.setStroke(new BasicStroke(width,BasicStroke.CAP_ROUND,BasicStroke.JOIN_ROUND)); 194 //g2d.setStroke(new BasicStroke(width));195 196 Point p1 = nc.getPoint(ls.from.eastNorth);197 Point p2 = nc.getPoint(ls.to.eastNorth);198 // checking if this Point is visible199 if ((p1.x < 0) && (p2.x < 0)) return ;200 if ((p1.y < 0) && (p2.y < 0)) return ;201 if ((p1.x > nc.getWidth()) && (p2.x > nc.getWidth())) return ;202 if ((p1.y > nc.getHeight()) && (p2.y > nc.getHeight())) return ;203 201 204 202 g.drawLine(p1.x, p1.y, p2.x, p2.y); … … 209 207 g.drawLine(p2.x,p2.y, (int)(p2.x + 10*Math.cos(t+PHI)), (int)(p2.y + 10*Math.sin(t+PHI))); 210 208 } 209 g2d.setStroke(new BasicStroke(1)); 211 210 212 211 }
Note:
See TracChangeset
for help on using the changeset viewer.