()
| 931 | } |
| 932 | |
| 933 | void makeLine() { |
| 934 | double x1d = getFirstArg(); |
| 935 | double y1d = getNextArg(); |
| 936 | double x2d = getNextArg(); |
| 937 | interp.getComma(); |
| 938 | double y2d = interp.getExpression(); |
| 939 | interp.getToken(); |
| 940 | if (interp.token==')') |
| 941 | IJ.makeLine(x1d, y1d, x2d, y2d); |
| 942 | else { |
| 943 | Polygon points = new Polygon(); |
| 944 | points.addPoint((int)Math.round(x1d),(int)Math.round(y1d)); |
| 945 | points.addPoint((int)Math.round(x2d),(int)Math.round(y2d)); |
| 946 | while (interp.token==',') { |
| 947 | int x = (int)Math.round(interp.getExpression()); |
| 948 | if (points.npoints==2 && interp.nextToken()==')') { |
| 949 | interp.getRightParen(); |
| 950 | Roi line = new Line(x1d, y1d, x2d, y2d); |
| 951 | line.updateWideLine((float)x); |
| 952 | getImage().setRoi(line); |
| 953 | return; |
| 954 | } |
| 955 | interp.getComma(); |
| 956 | int y = (int)Math.round(interp.getExpression()); |
| 957 | points.addPoint(x,y); |
| 958 | interp.getToken(); |
| 959 | } |
| 960 | getImage().setRoi(new PolygonRoi(points, Roi.POLYLINE)); |
| 961 | } |
| 962 | resetImage(); |
| 963 | } |
| 964 | |
| 965 | void makeArrow() { |
| 966 | String options = ""; |
no test coverage detected