Changeset 32826 in osm for applications/editors/josm/plugins/routes/src/org/openstreetmap
- Timestamp:
- 2016-08-18T03:25:35+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/routes/src/org/openstreetmap/josm/plugins/routes/paint/AbstractLinePainter.java
r30738 r32826 22 22 Point intersection) 23 23 { 24 double 25 x2 = l1.getX2(), y2 = l1.getY2(),26 x3 = l2.getX1(), y3 = l2.getY1(),27 x4 = l2.getX2(), y4 = l2.getY2();24 double x1 = l1.getX1(), y1 = l1.getY1(), 25 x2 = l1.getX2(), y2 = l1.getY2(), 26 x3 = l2.getX1(), y3 = l2.getY1(), 27 x4 = l2.getX2(), y4 = l2.getY2(); 28 28 double dx1 = x2 - x1; 29 29 double dx2 = x4 - x3; … … 145 145 } 146 146 147 private void drawSegment(Graphics2D g, NavigatableComponent nc, GeneralPath path, Point p1, Pointp2) {147 private void drawSegment(Graphics2D g, NavigatableComponent nc, GeneralPath path, Point2D p1, Point2D p2) { 148 148 boolean drawIt = false; 149 149 if (Main.isOpenjdk) { … … 165 165 if (drawIt) { 166 166 /* draw segment line */ 167 path.moveTo(p1. x, p1.y);168 path.lineTo(p2. x, p2.y);167 path.moveTo(p1.getX(), p1.getY()); 168 path.lineTo(p2.getX(), p2.getY()); 169 169 } 170 170 } 171 171 172 private boolean isSegmentVisible(NavigatableComponent nc, Point p1, Pointp2) {173 if ((p1. x < 0) && (p2.x< 0)) return false;174 if ((p1. y < 0) && (p2.y< 0)) return false;175 if ((p1. x > nc.getWidth()) && (p2.x> nc.getWidth())) return false;176 if ((p1. y > nc.getHeight()) && (p2.y> nc.getHeight())) return false;172 private boolean isSegmentVisible(NavigatableComponent nc, Point2D p1, Point2D p2) { 173 if ((p1.getX() < 0) && (p2.getX() < 0)) return false; 174 if ((p1.getY() < 0) && (p2.getY() < 0)) return false; 175 if ((p1.getX() > nc.getWidth()) && (p2.getX() > nc.getWidth())) return false; 176 if ((p1.getY() > nc.getHeight()) && (p2.getY() > nc.getHeight())) return false; 177 177 return true; 178 178 }
Note:
See TracChangeset
for help on using the changeset viewer.