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

Method fill

ij/src/main/java/ij/gui/Overlay.java:451–465  ·  view source on GitHub ↗

Fills all the ROIs in this overlay with 'foreground' after clearing the the image to 'background' if it is not null.

(ImagePlus imp, Color foreground, Color background)

Source from the content-addressed store, hash-verified

449 /** Fills all the ROIs in this overlay with 'foreground' after clearing the
450 the image to 'background' if it is not null. */
451 public void fill(ImagePlus imp, Color foreground, Color background) {
452 ImageProcessor ip = imp.getProcessor();
453 if (background!=null) {
454 ip.resetRoi();
455 ip.setColor(background);
456 ip.fillRect(0,0,ip.getWidth(),ip.getHeight());
457 }
458 if (foreground!=null) {
459 ip.setColor(foreground);
460 for (int i=0; i<size(); i++)
461 ip.fill(get(i));
462 ip.resetRoi();
463 }
464 imp.updateAndDraw();
465 }
466
467 void setVector(Vector<Roi> v) {list = v;}
468

Callers 15

doOverlayMethod · 0.95
getParamsMethod · 0.45
getFunctionValueMethod · 0.45
getCenterMethod · 0.45
incrementCounterMethod · 0.45
addValueMethod · 0.45
getFreeColumnMethod · 0.45
setValueMethod · 0.45
setHeadingMethod · 0.45
updateMethod · 0.45
drawPlotObjectMethod · 0.45

Calls 10

resetRoiMethod · 0.95
setColorMethod · 0.95
fillRectMethod · 0.95
getWidthMethod · 0.95
getHeightMethod · 0.95
sizeMethod · 0.95
fillMethod · 0.95
getMethod · 0.95
getProcessorMethod · 0.45
updateAndDrawMethod · 0.45

Tested by 15

setupMethod · 0.36
doGetGZIPTileDataMethod · 0.36
checkOneCombinationMethod · 0.36
testFitsUndefinedHdu5Method · 0.36
runMethod · 0.36
testAllHeadersMethod · 0.36