MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / makePoint

Method makePoint

ij/src/main/java/ij/IJ.java:1425–1436  ·  view source on GitHub ↗

Creates a point selection using integer coordinates..

(int x, int y)

Source from the content-addressed store, hash-verified

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) {

Callers 1

makePointMethod · 0.95

Calls 9

getImageMethod · 0.95
getRoiMethod · 0.95
shiftKeyDownMethod · 0.95
getTypeMethod · 0.95
setKeyUpMethod · 0.95
altKeyDownMethod · 0.95
setRoiMethod · 0.95
addUserPointMethod · 0.80
deleteHandleMethod · 0.80

Tested by

no test coverage detected