(Color c)
| 965 | } |
| 966 | |
| 967 | public static void setForegroundColor(Color c) { |
| 968 | if (c==null) |
| 969 | return; |
| 970 | foregroundColor = c; |
| 971 | foregroundValue = Double.NaN; |
| 972 | IJ.notifyEventListeners(IJEventListener.FOREGROUND_COLOR_CHANGED); |
| 973 | if (instance==null) |
| 974 | return; |
| 975 | repaintTool(DROPPER); |
| 976 | for (int i=CUSTOM1; i<=instance.getNumTools()-2; i++) { |
| 977 | if (instance.icons[i]!=null && instance.icons[i].contains("C123")) |
| 978 | repaintTool(i); // some of this tool's icon is drawn in the foreground color |
| 979 | } |
| 980 | ColorPicker.update(); |
| 981 | if (!IJ.isMacro()) setRoiColor(c); |
| 982 | ImagePlus imp = WindowManager.getCurrentImage(); |
| 983 | if (imp!=null) |
| 984 | imp.getProcessor().fillColorSet(false); |
| 985 | } |
| 986 | |
| 987 | public static Color getBackgroundColor() { |
| 988 | return backgroundColor; |
no test coverage detected