[cairo] Cairo and ISO C++
dov.grobgeld at gmail.com
Wed Jan 15 12:24:35 PST 2014
Please don't even consider taking away anti-aliasing. I'm using it in 
and  in order to use the same graphical primitives for painting and for
outputting a label image (an image where the "color" indicates a label for
the object at the pixel). Painting with antialiased graphics destroys the
ability to create the label image.
On Wed, Jan 15, 2014 at 9:40 PM, Bill Spitzak <spitzak at gmail.com> wrote:
> Yes it does sound like the "crisp edges" specified there, however they are
> describing an excessively complex and non-working solution.
> All I want is for strokes that have an odd width to be offset by .5, .5,
> the purpose being to be able to reuse the path for both a fill and stroke
> and get a sharp edge. I used the zero linewidth because every other
> graphics library I have ever seen used zero for this, and because most uses
> would like the same line no matter what the CTM is (it is often used to
> draw guidelines), and because I did not want to add another call to the
> Cairo API.
> You cannot adjust all the strokes to the nearest pixel because this will
> either cause identical objects to vary in size, or identical gaps between
> objects to vary in size. Both look much uglier than antialiasing. Fixing
> this would require advanced AI that replicates the human visual system to
> detect what adjustments are acceptable. And you never want to "turn off
> antialiasing" and I think it would be nice if Cairo removed this ability,
> as amateur programmers seem to think it is the solution to everything.
> The alternative is to provide an api that communicates accurate metrics of
> the actual area the rendered path took, similar to how font metrics are
> done. I don't think cairo wants to go there.
> Emmanuel PACAUD wrote:
> The mode you describes is pretty much shape-rendering="crispEdges" in
>> the SVG world.
>> While it would be nice to have something like that in cairo, I don't
>> think the special zero linewidth approach is interresting, as crisp
>> edges is not limited to only one pixel strokes. And I would not have
>> this mode by default.
>> It would be better implemented as a mode set by a call to a
>> cairo_set_rendering_mode function, which would match the SVG model (I'm
>> not sure, but probably the PDF model too).
> cairo mailing list
> cairo at cairographics.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo