PS/PDF API Change Proposal: (Re: [cairo] Semantics of transparent objects)

Keith Packard keithp at keithp.com
Thu Jan 19 18:54:04 PST 2006


On Thu, 2006-01-19 at 14:50 -0800, Carl Worth wrote:

> 
> 1) cairo_content_t passed to surface_create for all "print" surfaces
> 
> 2) cairo_content_t assumed as COLOR_ALPHA by default for print surface
>    and alternate constructor available for COLOR
> 
> 3) cairo_content_t assumed as COLOR by default for print surface and
>    alternate constructor available for COLOR_ALPHA
> 
> 4) cairo_content_t assumed as COLOR_ALPHA for print surface and the
>    user is expected to use a group to get COLOR semantics
> 
> 5) cairo_content_t assumed as COLOR for print surface and the user is
>    expected to use a group to get COLOR_ALPHA semantics

Of these options, I prefer 1) if only because it places the information
about what's going on right in front of the developer when they're just
starting to think about printing; providing a 'default' with an
alternative function will mean that many people will only learn about
the default, assuming that the 'advanced' function is not something they
need. In fact, which variant is required depends solely on what kind of
surface the original code was written for. In most cases, it will be a
COLOR surface (most X surfaces, all Windows surfaces), and so a COLOR
printer surface will produce matching output. In some cases, it will be
a COLOR_ALPHA surface (ARGB X surfaces, PNG files), where COLOR_ALPHA
will produce matching output.

Again, having the user frob this knob when they get the wrong output
seems like the most discoverable way to solve their problem.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060119/9532cf0f/attachment-0001.pgp


More information about the cairo mailing list