[cairo] RFC the idea of n-plane color support
Carl Worth
cworth at cworth.org
Wed Nov 3 08:46:52 PST 2004
On Mon, 01 Nov 2004 18:23:32 -0500, Ross McFarland wrote:
> no disagreement.
Phew.
> public api in a separate header not normally included by apps, that
> explicitly says do not use this unless you are creating an app that
> speaks to a specific backend developed in conjunction with that app.
> while it's not ideal, i think that's a reasonable route.
Sure, I could imagine adding something like:
cairo_pdf_this_is_the_pantone_color_I_actually_want_here
We can add backend-specific functions as necessary, (after ruling out a
generic solution). Or backends can provide hooks through a separate
library interface as does glitz). But I don't want to add a generic
function like cairo_set_n_color that just so happens to fail on some
subset of the backends.
> i think down that road lies madness. a sufficent api for things like
> that could be unwieldy. i don't think cairo should know anything about
> color but i think it best to take it a step further and allow that color
> it doesn't know about to be anything to allow for possible future cases.
OK, I disagree here. I think cairo should provide a precise means for
the user to describe the desired appearance of the objects, including
their color.
> i would settle for changing the internal structure to something that
> could hold an arbitrary number of color planes. then changing the
> existing backends to require that it be 3 plane and read it out of that
> structure accordingly, assuming it's (s)RGB. thus leaving the public api
> untouched (still having set_rgb, etc.) until the time came when the
> ability was going to be specifically used and could be designed
> accordingly.
That would be a much less contentious patch for me to accept. But I also
wouldn't find it compelling at all. I don't have a lot of stake in
anything about the current implementation. At any point I'd be glad to
rip out and rewrite large parts of it. So, I'd prefer to wait until
there was some use before redoing the internals.
It's getting the API right that I really care about right now.
-Carl
More information about the cairo
mailing list