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

Method floodFill

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

Source from the content-addressed store, hash-verified

4096 }
4097
4098 void floodFill() {
4099 int x = (int)getFirstArg();
4100 int y = (int)getNextArg();
4101 boolean fourConnected = true;
4102 if (interp.nextToken()==',') {
4103 String s = getLastString();
4104 if (s.indexOf("8")!=-1)
4105 fourConnected = false;
4106 } else
4107 interp.getRightParen();
4108 ImageProcessor ip = getProcessor();
4109 FloodFiller ff = new FloodFiller(ip);
4110 if (fourConnected)
4111 ff.fill(x, y);
4112 else
4113 ff.fill8(x, y);
4114 updateAndDraw();
4115 if (IJ.recording() && pgm.hasVars)
4116 Recorder.record("floodFill", x, y);
4117 }
4118
4119 void restorePreviousTool() {
4120 interp.getParens();

Callers 1

doFunctionMethod · 0.95

Calls 12

getFirstArgMethod · 0.95
getNextArgMethod · 0.95
getLastStringMethod · 0.95
getProcessorMethod · 0.95
fillMethod · 0.95
fill8Method · 0.95
updateAndDrawMethod · 0.95
recordingMethod · 0.95
recordMethod · 0.95
getRightParenMethod · 0.80
nextTokenMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected