<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Please don't even consider taking away anti-aliasing. I'm using it in [1] and [2] 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.<br>
<br>See:<br>[1] <a href="https://github.com/dov/dovtk-lasso">https://github.com/dov/dovtk-lasso</a><br>[2] <a href="https://github.com/dov/giv">https://github.com/dov/giv</a><br><br></div><div style id="divCleekiAttrib"></div>
<div style id="divCleekiAttrib"></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 9:40 PM, Bill Spitzak <span dir="ltr"><<a href="mailto:spitzak@gmail.com" target="_blank">spitzak@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes it does sound like the "crisp edges" specified there, however they are describing an excessively complex and non-working solution.<br>
<br>
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.<br>
<br>
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.<br>
<br>
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.<div class="HOEnZb"><div class="h5">
<br>
<br>
Emmanuel PACAUD wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The mode you describes is pretty much shape-rendering="crispEdges" in<br>
the SVG world.<br>
<br>
<a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering" target="_blank">https://developer.mozilla.org/<u></u>en-US/docs/Web/SVG/Attribute/<u></u>shape-rendering</a><br>
<br>
While it would be nice to have something like that in cairo, I don't<br>
think the special zero linewidth approach is interresting, as crisp<br>
edges is not limited to only one pixel strokes. And I would not have<br>
this mode by default.<br>
<br>
It would be better implemented as a mode set by a call to a<br>
cairo_set_rendering_mode function, which would match the SVG model (I'm<br>
not sure, but probably the PDF model too).<br>
<br>
Cheers,<br>
<br>
Emmanuel.<br>
</blockquote>
-- <br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org" target="_blank">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" target="_blank">http://lists.cairographics.<u></u>org/mailman/listinfo/cairo</a><br>
</div></div></blockquote></div><br></div>