You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by Peter Hancock <pe...@gmail.com> on 2010/07/01 13:03:43 UTC

Re: Status of the new color infrastructure

Hi guys,

> But I've just thought of a better alternative:
> Moving (!) ColorExt back to FOP where it was and moving
> GrayScaleConverter to FOP solves the whole problem with minimal effort
> in FOP Trunk.
Do you intend to refactor the static ColorUtil.toCMYKGrayColor method
to a member of GrayScaleConverter?

I think this move makes sense for this release but it is a shame to
water down the color package in XGC.

Pete

On Wed, Jun 30, 2010 at 9:48 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> On 30.06.2010 21:13:10 Simon Pepping wrote:
>> Does this mean that you want to finish your color work and merge it
>> into trunk before a release?
>
> No, not necessarily. I wanted to discuss what the best course of action
> is concerning the new color infrastructure. Releasing XGC as is causes
> ColorExt to become unusable as a name for the new extended Color class
> since my changes are not backwards-compatible except if we accept a lot
> of memory overhead for the compatibility (which I don't want to). I'll
> have to find a different catchy and short name for that class
> (suggestions welcome BTW) and deprecate ColorExt later.
>
>> I am not happy with that from a project management point of view. It
>> is best to take the decision to make a release, and do that. There is
>> always a nice addition tomorrow, but there is also always a next
>> release.
>
> Except for the little thing called backwards-compatibility. ColorExt is
> new in XGC and we already know it has to change in an incompatible way
> before its first release. The problem is that this has ripples into FOP.
> That's why we have to at least shortly discuss it.
>
>> Many users want a FOP release, so they can use two years of
>> improvements and bug fixes without having to deal with subversion
>> check-outs and build tools.
>
> I know, and I also know that you spend your free time and energy on this.
> And I'm sorry I didn't have this finished earlier.
>
> If you want to do the release now, that's fine. I just need a new class
> name for the new ColorExt class. And I need people to know the
> consequences of a release right now.
>
> But I've just thought of a better alternative:
> Moving (!) ColorExt back to FOP where it was and moving
> GrayScaleConverter to FOP solves the whole problem with minimal effort
> in FOP Trunk. The ColorConverter interface is fine as it is and can stay
> there. This will also restore backwards-compatibility for FOP's ColorExt
> and CMYKColorSpace classes which were already present in 0.95 but
> removed instead of deprecated. That would take half an hour at most
> tomorrow morning.
>
> WDYT?
>
>> Simon
>>
>> On Wed, Jun 30, 2010 at 04:08:36PM +0200, Jeremias Maerki wrote:
>> > As a heads-up since Simon seems to be back to preparing the XGC release:
>> >
>> > The new basic color infrastructure stands in the dev branch. And it
>> > seems to cover everything necessary for XSL-FO. There are two tricky
>> > things around this:
>> >
>> > 1. I don't really like getting the current ColorExt from Trunk into the
>> > XGC release. The ColorExt in the color branch isn't compatible, but
>>
>> --
>> Simon Pepping
>> home page: http://www.leverkruid.eu
>>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: Status of the new color infrastructure

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
No, this can't be addressed, since java.awt.Color only checks its sRGB
values, but not the actual color components if it's based on a non-sRGB
color space. And we can't change java.awt.Color. I've had to change FOP
in a few places in the color branch to test equals() in both directions
to detect color state changes. These collisions will not happen very
often but they are possible even in today's code. One thing that can be
done is to make sure FOP always uses a subclass of Color with a better
equals() method but that may not always work, for example, when barcodes,
PDF or WMF files are painted via Graphics2D.

I mentioned the equals() problem here:
http://wiki.apache.org/xmlgraphics/ColorHandling

On 01.07.2010 16:09:08 Peter Hancock wrote:
> I have noticed that the equals method of ColorExt is not reflexive, e.g.:
> 
> Color c = ..
> ColorExt ce = ColorExt.createFromFoRgbIcc(.. ,c.getColorSpace(),
> c.getColorComponents(), ..)
> 
> c.equals(ce) == true != ce.equals(c)
> 
> Could this be addressed now?
> 
> Pete
> 
> On Thu, Jul 1, 2010 at 2:00 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> > OK, I see. As you can see, I feel the pretty much way but the current
> > ColorExt is an abomination when it comes to extending it with additional
> > functionality. I guess, Simon can just cut the release and I'll replace
> > ColorExt with ColorWithAlternatives (or so). I just think it's a shame
> > to release something we know has to change drastically anyway for the
> > next release.
> >
> > On 01.07.2010 13:39:36 Peter Hancock wrote:
> >> > Not sure I understand what you wanted to say.
> >> I was trying to say that I felt that moving color utility code up to
> >> XGC was generally desirable and having to reverting back was a shame.
> >> By 'water down' I really meant reduce, which actually means the
> >> opposite!  Sorry :-) .
> >>
> >> On Thu, Jul 1, 2010 at 12:19 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> >> >
> >> > On 01.07.2010 13:03:43 Peter Hancock wrote:
> >> > > Hi guys,
> >> > >
> >> > > > But I've just thought of a better alternative:
> >> > > > Moving (!) ColorExt back to FOP where it was and moving
> >> > > > GrayScaleConverter to FOP solves the whole problem with minimal effort
> >> > > > in FOP Trunk.
> >> > > Do you intend to refactor the static ColorUtil.toCMYKGrayColor method
> >> > > to a member of GrayScaleConverter?
> >> >
> >> > I planned to move the toCMYKGrayColor method back to FOP's ColorUtil
> >> > until things are resolved.
> >> >
> >> > > I think this move makes sense for this release but it is a shame to
> >> > > water down the color package in XGC.
> >> >
> >> > Not sure I understand what you wanted to say.
> >> >
> >> > > Pete
> >> > <snip/>
> >> >
> >> >
> >> > Jeremias Maerki
> >> >
> >
> >
> > Jeremias Maerki
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: general-help@xmlgraphics.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org
> 




Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: Status of the new color infrastructure

Posted by Peter Hancock <pe...@gmail.com>.
I have noticed that the equals method of ColorExt is not reflexive, e.g.:

Color c = ..
ColorExt ce = ColorExt.createFromFoRgbIcc(.. ,c.getColorSpace(),
c.getColorComponents(), ..)

c.equals(ce) == true != ce.equals(c)

Could this be addressed now?

Pete

On Thu, Jul 1, 2010 at 2:00 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> OK, I see. As you can see, I feel the pretty much way but the current
> ColorExt is an abomination when it comes to extending it with additional
> functionality. I guess, Simon can just cut the release and I'll replace
> ColorExt with ColorWithAlternatives (or so). I just think it's a shame
> to release something we know has to change drastically anyway for the
> next release.
>
> On 01.07.2010 13:39:36 Peter Hancock wrote:
>> > Not sure I understand what you wanted to say.
>> I was trying to say that I felt that moving color utility code up to
>> XGC was generally desirable and having to reverting back was a shame.
>> By 'water down' I really meant reduce, which actually means the
>> opposite!  Sorry :-) .
>>
>> On Thu, Jul 1, 2010 at 12:19 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
>> >
>> > On 01.07.2010 13:03:43 Peter Hancock wrote:
>> > > Hi guys,
>> > >
>> > > > But I've just thought of a better alternative:
>> > > > Moving (!) ColorExt back to FOP where it was and moving
>> > > > GrayScaleConverter to FOP solves the whole problem with minimal effort
>> > > > in FOP Trunk.
>> > > Do you intend to refactor the static ColorUtil.toCMYKGrayColor method
>> > > to a member of GrayScaleConverter?
>> >
>> > I planned to move the toCMYKGrayColor method back to FOP's ColorUtil
>> > until things are resolved.
>> >
>> > > I think this move makes sense for this release but it is a shame to
>> > > water down the color package in XGC.
>> >
>> > Not sure I understand what you wanted to say.
>> >
>> > > Pete
>> > <snip/>
>> >
>> >
>> > Jeremias Maerki
>> >
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: Status of the new color infrastructure

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
OK, I see. As you can see, I feel the pretty much way but the current
ColorExt is an abomination when it comes to extending it with additional
functionality. I guess, Simon can just cut the release and I'll replace
ColorExt with ColorWithAlternatives (or so). I just think it's a shame
to release something we know has to change drastically anyway for the
next release.

On 01.07.2010 13:39:36 Peter Hancock wrote:
> > Not sure I understand what you wanted to say.
> I was trying to say that I felt that moving color utility code up to
> XGC was generally desirable and having to reverting back was a shame.
> By 'water down' I really meant reduce, which actually means the
> opposite!  Sorry :-) .
> 
> On Thu, Jul 1, 2010 at 12:19 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> >
> > On 01.07.2010 13:03:43 Peter Hancock wrote:
> > > Hi guys,
> > >
> > > > But I've just thought of a better alternative:
> > > > Moving (!) ColorExt back to FOP where it was and moving
> > > > GrayScaleConverter to FOP solves the whole problem with minimal effort
> > > > in FOP Trunk.
> > > Do you intend to refactor the static ColorUtil.toCMYKGrayColor method
> > > to a member of GrayScaleConverter?
> >
> > I planned to move the toCMYKGrayColor method back to FOP's ColorUtil
> > until things are resolved.
> >
> > > I think this move makes sense for this release but it is a shame to
> > > water down the color package in XGC.
> >
> > Not sure I understand what you wanted to say.
> >
> > > Pete
> > <snip/>
> >
> >
> > Jeremias Maerki
> >


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: Status of the new color infrastructure

Posted by Peter Hancock <pe...@gmail.com>.
> Not sure I understand what you wanted to say.
I was trying to say that I felt that moving color utility code up to
XGC was generally desirable and having to reverting back was a shame.
By 'water down' I really meant reduce, which actually means the
opposite!  Sorry :-) .

On Thu, Jul 1, 2010 at 12:19 PM, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
>
> On 01.07.2010 13:03:43 Peter Hancock wrote:
> > Hi guys,
> >
> > > But I've just thought of a better alternative:
> > > Moving (!) ColorExt back to FOP where it was and moving
> > > GrayScaleConverter to FOP solves the whole problem with minimal effort
> > > in FOP Trunk.
> > Do you intend to refactor the static ColorUtil.toCMYKGrayColor method
> > to a member of GrayScaleConverter?
>
> I planned to move the toCMYKGrayColor method back to FOP's ColorUtil
> until things are resolved.
>
> > I think this move makes sense for this release but it is a shame to
> > water down the color package in XGC.
>
> Not sure I understand what you wanted to say.
>
> > Pete
> <snip/>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Re: Status of the new color infrastructure

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 01.07.2010 13:03:43 Peter Hancock wrote:
> Hi guys,
> 
> > But I've just thought of a better alternative:
> > Moving (!) ColorExt back to FOP where it was and moving
> > GrayScaleConverter to FOP solves the whole problem with minimal effort
> > in FOP Trunk.
> Do you intend to refactor the static ColorUtil.toCMYKGrayColor method
> to a member of GrayScaleConverter?

I planned to move the toCMYKGrayColor method back to FOP's ColorUtil
until things are resolved.

> I think this move makes sense for this release but it is a shame to
> water down the color package in XGC.

Not sure I understand what you wanted to say.

> Pete
<snip/> 


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org