[cairo] Mac Tiger Core Image

mental at rydia.net mental at rydia.net
Thu Mar 10 11:25:07 PST 2005


Quoting Bill Spitzak <spitzak at d2.com>:

> > There are at least two gaps that I am currently aware of, and
> > for which we've already started some discussion on the list:

> Add 3x3 transformation for patterns:

I agree; 3x3 pattern matrices would be very helpful, yet 3x3
matrices for other things are not so important.

> In my opinion we only need the ability to turn off antialiasing
> for individual straight lineto's, perhaps with a new
> aliased-lineto call.

That is useful for some purposes like the ones you outline, though
it seems a little odd API-wise.  I guess I'm ambivalent on it as I
don't require it myself.

> Unlike several other posters, I do NOT think we want to be able
> to turn off antialiasing for anything else, such as stroke,
> letters, or curved portions of paths.

You might not need it.  I do.  My users (not to mention myself) need
a renderer that can optionally produce high-resolution output
without any antialiasing artifacts.

However, in my case it would be acceptable if explicitly turning
off antialiasing were an option for image surfaces rather
than something exposed through the generic surface/context API.

 void cairo_image_surface_set_antialiasing(cairo_surface_t *surface,
int enable);

> *discussion of what is essentially a primitive hinting/grid
> alignment approach snipped*

I don't think the ideas are bad necessarily, but it seems to me that
the specific suggestion tries to address them at the wrong level of
the API.

It seems like the sort of thing that a backend should do internally
in response to some sort of "rendering disposition" call that
requests optimization of legibility.

c.f. SVG's optimizeSpeed, optimizeLegibility, and optimizeGeometry

typedef enum {
  CAIRO_OPTIMIZE_SPEED,
  CAIRO_OPTIMIZE_LEGIBILITY,
  CAIRO_OPTIMIZE_GEOMETRY /* default */
} cairo_disposition_t;

 void cairo_set_rendering_disposition(cairo_t *cr,
cairo_disposition_t disposition);

Different backends may need to make different sorts of decisions to
enhance legibility, so it makes sense to let the backend decide
rather than deciding details like that up front.

(this is also true of e.g. whether or not turning off antialiasing
would be a reasonable speed optimization -- as others have pointed
out, that may vary with the backend)

Thoughts?

-mental



More information about the cairo mailing list