(double ox, double oy)
| 817 | } |
| 818 | |
| 819 | public void deleteHandle(double ox, double oy) { |
| 820 | if (imp==null) |
| 821 | return; |
| 822 | if (nPoints<=1) { |
| 823 | imp.deleteRoi(); |
| 824 | return; |
| 825 | } |
| 826 | boolean splineFit = xSpline!=null; |
| 827 | if (splineFit) |
| 828 | removeSplineFit(); |
| 829 | FloatPolygon points = getFloatPolygon(); |
| 830 | int pointToDelete = getClosestPoint(ox, oy, points); |
| 831 | if (pointToDelete>=0) { |
| 832 | deletePoint(pointToDelete); |
| 833 | if (splineFit) |
| 834 | fitSpline(splinePoints); |
| 835 | imp.draw(); |
| 836 | } |
| 837 | } |
| 838 | |
| 839 | protected void deletePoint(int index) { |
| 840 | if (index<0 || index>=nPoints) |
no test coverage detected