[Cairo] Color transforms
otaylor at redhat.com
Thu Jul 17 07:32:03 PDT 2003
On Thu, 2003-07-17 at 00:35, Keith Packard wrote:
> Around 0 o'clock on Jul 17, Trevor Woerner wrote:
> > IMHO, if multi-platform is what everyone wants, it would be slightly
> > better to have less functionality but be consistent with the API and
> > capabilities, than to have the potential of some capabilities on some
> > systems but not on others.
> Every system can support raster images, so there's no reason to consider
> limited functionality anywhere; we can always dump images. That's going
> to be necessary for PostScript in any case as it doesn't support
> translucency. Other systems recognize when the output cannot be generated
> with higher level primitives and fall back to rasterization automatically,
> I think we can manage the same in cairo.
> Device-independent should mean that the API have no limitations caused by
> the rasterization engine for a particular device, but we will still need
> some media-specific functionality (like 'showpage'). Getting a PS driver
> running is a high priority mostly to make sure the API works for printing,
> not to make sure we can generate postscript (that's the easy part).
I would suggest that you should try to work the API so that the printing
API isn't glommed into the rendering API, but forms a separate layer;
that is, instead of cairo_showpage (context), have something more along
the lines of:
print_job = cairo_print_job_new_file (filename);
cairo_print_job_set_context (print_job, context);
/* draw a page onto context */
Or whatever. If it's set up this way, then you don't have to worry about
having lots of methods that only apply for some output devices.
More information about the cairo