On 2011-11-22, at 8:17 AM, Quentin Mathé wrote:
And one final point. You us the method call [path setLineWidth:
0.0]; This isn't as well defined as it may seem. Most people think
that this will select the smallest possible line width. At least
with our current code this may not be true for the cairo backend.
There is a long and ongoing discussion about zero line widths on
the cairo mailing list.
ok, I wasn't aware of this issue. Which width should I use to get
the thinnest possible line or something close? 0.5 or 0.1 for
example?
I added a fix to the cairo backend a few months ago which will
interpret 0 as a thin line (I think previously I broke a game which
was relying on that behaviour.)
However, I recommend drawing a filled rectangle instead of using
lines. In general, anywhere you have lines in a user interface, they
should probably be filled rectangles. Filled rectangles scale up in a
predictable way and are easy to pixel-align (just make the origin and
size integers.)