[cairo] RFC the idea of n-plane color support
rwmcfa1 at neces.com
Sat Oct 30 15:53:42 PDT 2004
On Sat, 2004-10-30 at 17:54, Carl Worth wrote:
> On Sat, 30 Oct 2004 16:43:09 -0400, Ross McFarland wrote:
> > it doesn't need to understand the color, as it doesn't now.
> But it does now. The color values provided by the user are sRGB. That's
> what allows various backends to be used.
cairo itself doesn't know anything about sRGB. it just passes the data
through. it could be any three plane color and the backend could
interpret it accordingly. it's only RGB in api name and backend
> > it just
> > needs the ability to pass it along any type of color as an essentially
> > opaque object. core cairo doesn't know anything about color and
> > shouldn't, only the backends and apps do.
> An opaque color type would only make sense for one specific
> backend. That breaks the design of cairo, and would also break the
> implementation as almost all the backends end up using the image backend
> as a fallback for certain operations.
nothing would be broken b/c the standard backends wouldn't support
anything but using sRGB (programming assertions.) the normal interfaces
would still talk in sRGB and backends would still interpret it as sRGB.
it would just internally be represented by something that could hold
other types. so that if special tied apps and backends (printer/press
RIP's) could be developed with cairo.
what i'm proposing would cause no visible changes to apps. and only
(possibly) slight changes to backends (array indexes rather than struct
members. changes it took me a couple of mins to make in my local copy of
kind of stuff.
More information about the cairo