(int red, int green, int blue, boolean foreground)
| 1757 | } |
| 1758 | |
| 1759 | static void setColor(int red, int green, int blue, boolean foreground) { |
| 1760 | Color c = Colors.toColor(red, green, blue); |
| 1761 | if (foreground) { |
| 1762 | Toolbar.setForegroundColor(c); |
| 1763 | ImagePlus img = WindowManager.getCurrentImage(); |
| 1764 | if (img!=null) |
| 1765 | img.getProcessor().setColor(c); |
| 1766 | } else |
| 1767 | Toolbar.setBackgroundColor(c); |
| 1768 | } |
| 1769 | |
| 1770 | /** Switches to the specified tool, where id = Toolbar.RECTANGLE (0), |
| 1771 | Toolbar.OVAL (1), etc. */ |
no test coverage detected