awt.Color conversion is repetitively re-implemented in the fop code-base. It would be useful to have a common interface for providing this functionality that could be used in the XMLGraphics child projects.
Created attachment 24724 [details] A color coverter interface
Hi Peter, I've taken a look at your patch and there are a number of checkstyle warnings about the use of tabs and trailing spaces. If you haven't done so already I suggest you enable checkstyle integration with your Java IDE and check the checkstyle report prior to submitting any patches. No need to submit a new patch just for checkstyle as I have corrected the checkstyle warnings locally. However, I am wondering why you have placed only the Interface into commons and put the implementations into FOP? Wouldn't it more make sense to put the implementations into commons too. I see they have a dependency on the ColorUtil.toCMYKGrayColor method in FOP, but that could be moved to a super class of ColorUtil that lives in commons. The move should be easy enough as your converter class appears to be the only user of that method. Chris
Created attachment 24817 [details] A ColorConverter interface with some generic implementations
Updated patch
Thanks for the updated Patch Peter. The inclusion of the implementations makes more sense now. Patch committed in revision 897202