You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by COFFMAN Steven <SC...@CBSINC.com> on 2000/04/21 19:00:38 UTC

Colorspace support

Ok... The patch I just applied adds RGB and CMYK colorspace support to PDF.
You can create a color based on RGB, and switch it to CMYK, and vice versa.
Patterns must have the colorspace set at creation time. I *had* it so that
you could dynamically switch a complex gradient from RGB to CMYK, but the
calculations involved brought my 200 Mhtz machine to it's knees, and my 400
Mhtz box took forever. I took it out, and everything is much smaller and
faster. Any opinions? This code also has two alternate views of gradients.
You can view a gradient as a vector of colors, or else as a shading which is
comprised of color interpolation functions. The first one let's you more
simply create a vector, the second gives you greater control and complexity.
I've attached a sample file to this message that has a hard coded boolean to
switch between the two methods. Check it out, and please don't think the
punk rock colors were chosen for any reason other than numerical simplicity.
 <<Xperimental.java>> 

I didn't patch PDFrender, because I'm not happy with my version yet. Also,
I'll need to re-write some minor stuff once I add a ColorSpace.java to the
datatypes (as per the Eric Schaeffer messages).

-Steve