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

Method clear

ij/src/main/java/ij/gui/TextRoi.java:670–690  ·  view source on GitHub ↗
(ImageProcessor ip)

Source from the content-addressed store, hash-verified

668 }
669
670 public void clear(ImageProcessor ip) {
671 if (font==null)
672 ip.fill();
673 else {
674 ip.setFont(font);
675 ip.setAntialiasedText(antialiasedText);
676 int i=0, w=0;
677 while (i<MAX_LINES && theText[i]!=null) {
678 int w2 = ip.getStringWidth(theText[i]);
679 if (w2>w);
680 w = w2;
681 i++;
682 }
683 Rectangle r = ip.getRoi();
684 if (w>r.width) {
685 r.width = w;
686 ip.setRoi(r);
687 }
688 ip.fill();
689 }
690 }
691
692 @Override
693 public void setLocation(int x, int y) {

Callers 9

handleLogCommandMethod · 0.45
updateArrayInspectorMethod · 0.45
doListMethod · 0.45
setMeasurementsMethod · 0.45
clearListenersMethod · 0.45
parsePathMethod · 0.45
setPropertiesMethod · 0.45
addToStackMethod · 0.45

Calls 6

setFontMethod · 0.65
fillMethod · 0.45
setAntialiasedTextMethod · 0.45
getStringWidthMethod · 0.45
getRoiMethod · 0.45
setRoiMethod · 0.45

Tested by

no test coverage detected