Re: [RFC] Off-by-one in linkmap cairo drawing ?



2009/4/27 Vincent Legoll <vincent legoll gmail com>:
> Hello,
>
> could someone please comment on the validity of:
>
> Attachment #133349: maybe this one is more complete
> for bug #580311
>
> The screenshots were taken with the first (obsoleted) patch

The horizontal line in your after-screenshots is blurred, which is
what the 0.5 adjustment fixes.

> What are all those magical 0.5 values for anyways ?

Rough answer: integer coordinates in Cairo fall between pixels, not on pixels
Longer answer: http://cairographics.org/FAQ/#sharp_lines

I changed the 0.2 to 0.5 a while back since the 0.2 was only there to
fix blurry rendering of straight lines, and for that purpose 0.5 is
what should actually be used.

As for the bug, the 'missing pixel' was the intended result at the
time. The idea is to indicate the insertion point of the diff, while
maintaining nice sharp straight lines where appropriate. I agree that
our rendering of these lines could be nicer... but if you play around
with different cases it quickly becomes non-trivial to get it right.
We should really decide how the lines *should* be placed, and then
figure out the rendering.

Kai


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]