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

Method makePoint

ij/src/main/java/ij/macro/Functions.java:6016–6040  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6014 }
6015
6016 void makePoint() {
6017 double x = getFirstArg();
6018 double y = getNextArg();
6019 String options = null;
6020 if (interp.nextToken()==',')
6021 options = getNextString();
6022 interp.getRightParen();
6023 if (options==null) {
6024 if ((int)x==x && (int)y==y)
6025 IJ.makePoint((int)x, (int)y);
6026 else
6027 IJ.makePoint(x, y);
6028 } else {
6029 if (options!=null && options.equals("add")) { //add point to multi-point selection
6030 IJ.setKeyDown(KeyEvent.VK_SHIFT);
6031 if ((int)x==x && (int)y==y)
6032 IJ.makePoint((int)x, (int)y);
6033 else
6034 IJ.makePoint(x, y);
6035 } else
6036 getImage().setRoi(new PointRoi(x, y, options));
6037 }
6038 resetImage();
6039 shiftKeyDown = altKeyDown = false;
6040 }
6041
6042 void makeText() {
6043 String text = getFirstString();

Callers 1

doFunctionMethod · 0.95

Calls 11

getFirstArgMethod · 0.95
getNextArgMethod · 0.95
getNextStringMethod · 0.95
makePointMethod · 0.95
setKeyDownMethod · 0.95
getImageMethod · 0.95
resetImageMethod · 0.95
getRightParenMethod · 0.80
nextTokenMethod · 0.45
equalsMethod · 0.45
setRoiMethod · 0.45

Tested by

no test coverage detected