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

Method setPlotFontSize

ij/src/main/java/ij/macro/Functions.java:2696–2714  ·  view source on GitHub ↗
(Plot plot, boolean forAxisLabels)

Source from the content-addressed store, hash-verified

2694 }
2695
2696 double setPlotFontSize(Plot plot, boolean forAxisLabels) {
2697 float size = (float)getFirstArg();
2698 int style = -1;
2699 if (interp.nextToken()!=')') {
2700 String options = getNextString().toLowerCase();
2701 style = 0;
2702 if (options.indexOf("bold") >= 0)
2703 style |= Font.BOLD;
2704 if (options.indexOf("ital") >= 0)
2705 style |= Font.ITALIC;
2706 }
2707 interp.getRightParen();
2708 if (forAxisLabels)
2709 plot.setAxisLabelFont(style, size);
2710 else
2711 plot.setFont(style, size);
2712 plot.updateImage();
2713 return Double.NaN;
2714 }
2715
2716 double setPlotFormatFlags(Plot plot) {
2717 String flagString = getStringArg();

Callers 1

doPlotMethod · 0.95

Calls 8

getFirstArgMethod · 0.95
getNextStringMethod · 0.95
getRightParenMethod · 0.80
setAxisLabelFontMethod · 0.80
setFontMethod · 0.65
nextTokenMethod · 0.45
indexOfMethod · 0.45
updateImageMethod · 0.45

Tested by

no test coverage detected