[cairo] Re: Using ADD operator to prevent seams
Bill Spitzak
spitzak at d2.com
Mon Mar 21 11:18:25 PST 2005
I'm pretty convinced that there is a need to draw adjacent
non-overlapping filled polygons so that seams are prevented.
But I don't like the idea of "turn off antialiasing" however. I would
like to be able to take advantage of whatever the solution is without
losing the ability to have antialiasing on other parts of the drawing,
including the outer edge of the same shape! "turn off antialiasing" is
thus the wrong approach, and supporting it will be misleading and
discourage fixing this for real.
I think marking some edges of a path as being "adjoining" would solve
this. This will only affect fill and using the path as a clip. Initially
it will produce an aliased edge, but it could enable supersampling or
whole new compositing algorithims instead, so it should be named to make
it clear that it does not necessarily disable antialiasing. As I see it
only two new calls are needed: adjoining-lineto and adjoining-curveto.
I would rather not see any way to turn off antialiasing of fonts, lines,
and patterns (though I would like 0-width lines like other backends, as
this gets rid of the other reason aliasing is often requested). Fonts in
particular may be *slowed* by aliasing, as it disallows algorithms like
scaling larger images which are otherwise the fastest method on modern
hardware.
A special "aliased" backend can also be provided. This would be totally
unrelated to the normal device backend, it would not be hardware
accelerated, and would draw into an image buffer, and then copy that to
the device. If you can set the scale from the image to the device this
will also produce supersampled antialiasing.
More information about the cairo
mailing list