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

Method drawString

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

Source from the content-addressed store, hash-verified

1207 }
1208
1209 void drawString() {
1210 interp.getLeftParen();
1211 String str = getString();
1212 interp.getComma();
1213 int x = (int)(interp.getExpression()+0.5);
1214 interp.getComma();
1215 int y = (int)(interp.getExpression()+0.5);
1216 Color background = null;
1217 if (interp.nextToken()==',') {
1218 interp.getComma();
1219 background = getColor();
1220 }
1221 interp.getRightParen();
1222 ImageProcessor ip = getProcessor();
1223 setFont(ip);
1224 ip.setJustification(justification);
1225 ip.setAntialiasedText(antialiasedText);
1226 if (background!=null)
1227 ip.drawString(str, x, y, background);
1228 else
1229 ip.drawString(str, x, y);
1230 updateAndDraw();
1231 }
1232
1233 void setFont(ImageProcessor ip) {
1234 if (font!=null && !fontSet)

Callers 1

doFunctionMethod · 0.95

Calls 13

getStringMethod · 0.95
getColorMethod · 0.95
getProcessorMethod · 0.95
setFontMethod · 0.95
setJustificationMethod · 0.95
setAntialiasedTextMethod · 0.95
drawStringMethod · 0.95
updateAndDrawMethod · 0.95
getLeftParenMethod · 0.80
getCommaMethod · 0.80
getExpressionMethod · 0.80
getRightParenMethod · 0.80

Tested by

no test coverage detected