Ticket #857 (closed defect: fixed)
Can't set current FG or BG color
| Reported by: | bdezonia | Owned by: | bdezonia |
|---|---|---|---|
| Priority: | major | Milestone: | imagej-2.0.0-beta1 |
| Component: | ij-tool | Version: | |
| Severity: | serious | Keywords: | |
| Cc: | Blocked By: | ||
| Blocking: |
Description
In IJ1 we have the color picker tools which allows the foreground and background colors (or values) to be set. These values are used by the Fill command. The capability to specify these is not present in IJ2. Add this capability and then also fix #506.
Change History
comment:2 Changed 6 months ago by bdezonia
Forgot to mention that the mechanics of FGTool's tracking of foreground color could change or be reloacted. This will have something to do with support of IJ1 COlor Picker. Will detail in that ticket.
comment:3 Changed 6 months ago by bdezonia
Grabbed an icon from IJ1 and modified it for IJ2. Not sure if transparency is done correctly. This icon may change when we determine exactly how we want to display and select fg/bg colors/values.
comment:4 Changed 6 months ago by bdezonia
- fixed icon to look better
- refactored pixelprobe and fgtool to use a pixelhelper class to do much of its work
TODO
- IJ1 color picker affecting the storage somewhere of FG & BG colors and values
- finalize location of these values (not in FGTool??)
comment:5 Changed 6 months ago by bdezonia
After discussion with Curtis decided the FG/BG values should be saved as an OptionsDialog and accessible via the OptionsService. Modify so FGTool doesn;t store anymore. Remove Fill plugins project to not rely on ij-tool.

In r4498 implemented a FGTool that sets the foreground color/value to match the pixel under the current mouse click point.
There are a number of issues with the implementation which I note here:
1) IJ1's Color Picker code does not interact with FGTool in any way. This needs to change but merits it's own ticket.
2) I have not yet defined an icon for the dropper. I should be able to draw one using IJ1's Toolbar.java as a reference
3) we could refactor PixelProbe & FGTool as they share similar code