NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #857 (closed defect: fixed)

Opened 2011-11-01T09:44:11-05:00

Last modified 2012-01-25T09:59:05-06:00

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 2011-11-28T15:06:23-06:00 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 2011-11-28T15:07:47-06:00 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 2011-11-28T16:17:35-06:00 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 2011-11-29T10:31:19-06:00 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 2011-12-01T10:04:10-06:00 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 2012-01-25T09:58:05-06:00 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 2012-01-25T09:59:05-06:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed