Ticket #857 (closed defect: fixed)

Opened 8 years ago

Last modified 7 years ago

Can't set current FG or BG color

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b1-initial
Component: Tools 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:1 Changed 7 years ago by bdezonia

In 9927bcf5229d93070f803133fc4a52c27e72817a 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

comment:2 Changed 7 years 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 7 years 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 7 years 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 7 years 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.

comment:6 Changed 7 years ago by bdezonia

Fixed in e339745786cf766f6d6ee1cc0120bdf3be05db45. Made OptionsColor responsible for tracking foreground/background colors/grays. Updated FGTool (now PickerTool) to set these options. Made FillDataValues plugin use these values.

comment:7 Changed 7 years ago by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.