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

Method setForegroundValue

ij/src/main/java/ij/gui/Toolbar.java:1007–1014  ·  view source on GitHub ↗

Sets the foreground color to grayscale, where value is between 0 (black) and 255 (white).

(double value)

Source from the content-addressed store, hash-verified

1005 /** Sets the foreground color to grayscale, where value
1006 is between 0 (black) and 255 (white). */
1007 public static void setForegroundValue(double value) {
1008 if (value>=0) {
1009 int v = (int)value;
1010 if (v>255) v=255;
1011 setForegroundColor(new Color(v,v,v));
1012 }
1013 foregroundValue = value;
1014 }
1015
1016 public static double getBackgroundValue() {
1017 return backgroundValue;

Callers 1

doColorMethod · 0.95

Calls 1

setForegroundColorMethod · 0.95

Tested by

no test coverage detected