Line l = sl.toLine();
double a = Math.atan(l.getVerticalK());// 角度
double dx = distance * Math.cos(a);
double dy = distance * Math.sin(a);
CPoint p1 = new Coordinate2D(sl.getStartPoint().getX() - dx, sl.getStartPoint()
.getY()
- dy);
CPoint p2 = new Coordinate2D(sl.getStartPoint().getX() + dx, sl.getStartPoint()
.getY()
+ dy);
CPoint p3 = new Coordinate2D(sl.getEndPoint().getX() + dx, sl.getEndPoint()
.getY()
+ dy);
CPoint p4 = new Coordinate2D(sl.getEndPoint().getX() - dx, sl.getEndPoint()
.getY()
- dy);
CoordSeqEditor ls = new CoordSeqEditor();
ls.addPointToLast(p1);