[cairo] turn off antialiasing

mental at rydia.net mental at rydia.net
Mon Mar 7 15:46:33 PST 2005


Quoting DANIELLLANO <DANIELLLANO at terra.es>:

> Could you give me some references to that?
> fringing in computer generated images?

Draw two dark shapes with complex edges that fit together (e.g.
"puzzle pieces") against a light background.  There will most
likely be a faint fringe between them (this phenomenon was the
subject of a very recent thread on this same mailing list, in
fact).

The fringe is unavoidable with antialiasing unless you can compute
exact coverage (Cairo isn't set up to do that), or adopt a hack
like Antigrain's slight dilation of fills.

A different sort of fringing is possible when you're doing
high-resolution RIP at the native device resolution (e.g. for
printing).  Antialiasing can result in "speckles" around the edges
of shapes, if something downstream in the pipeline tries to perform
dithering.

> Why would you like to turn antialiasing off on some objects?

Faster rendering, depending on how those objects would be used.

 shape-rendering="optimizeSpeed"

Also, in my own field -- vector graphics editors -- the ability to
turn off antialiasing for speed when editing is also a HIGHLY
demanded feature for being able to work with very complex images.

> I don't like that part of the SVG standard.

Take it up with the SVG WG then.

Antialiasing is an imperfect perceptual approximation which has
tradeoffs.  Those tradeoffs are not acceptable in all
circumstances.

-mental



More information about the cairo mailing list