Creates a point selection using integer coordinates..
(int x, int y)
| 1423 | |
| 1424 | /** Creates a point selection using integer coordinates.. */ |
| 1425 | public static void makePoint(int x, int y) { |
| 1426 | ImagePlus img = getImage(); |
| 1427 | Roi roi = img.getRoi(); |
| 1428 | if (shiftKeyDown() && roi!=null && roi.getType()==Roi.POINT) { |
| 1429 | ((PointRoi)roi).addUserPoint(null, x, y); |
| 1430 | IJ.setKeyUp(KeyEvent.VK_SHIFT); |
| 1431 | } else if (altKeyDown() && roi!=null && roi.getType()==Roi.POINT) { |
| 1432 | ((PolygonRoi)roi).deleteHandle(x, y); |
| 1433 | IJ.setKeyUp(KeyEvent.VK_ALT); |
| 1434 | } else |
| 1435 | img.setRoi(new PointRoi(x, y)); |
| 1436 | } |
| 1437 | |
| 1438 | /** Creates a point selection using floating point coordinates. */ |
| 1439 | public static void makePoint(double x, double y) { |
no test coverage detected