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

Method getCursorLoc

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

Source from the content-addressed store, hash-verified

1992 }
1993
1994 void getCursorLoc() {
1995 Variable x = getFirstVariable();
1996 Variable y = getNextVariable();
1997 Variable z = getNextVariable();
1998 Variable flags = getLastVariable();
1999 ImagePlus imp = getImage();
2000 ImageCanvas ic = imp.getCanvas();
2001 if (ic==null) return;
2002 Point p = ic.getCursorLoc();
2003 x.setValue(p.x);
2004 y.setValue(p.y);
2005 z.setValue(imp.getCurrentSlice()-1);
2006 Roi roi = imp.getRoi();
2007 flags.setValue(ic.getModifiers()+((roi!=null)&&roi.contains(p.x,p.y)?32:0));
2008 }
2009
2010 void getLine() {
2011 Variable vx1 = getFirstVariable();

Callers 1

doFunctionMethod · 0.95

Calls 11

getFirstVariableMethod · 0.95
getNextVariableMethod · 0.95
getLastVariableMethod · 0.95
getImageMethod · 0.95
getCanvasMethod · 0.95
getCursorLocMethod · 0.95
setValueMethod · 0.95
getCurrentSliceMethod · 0.95
getRoiMethod · 0.95
getModifiersMethod · 0.95
containsMethod · 0.95

Tested by

no test coverage detected