[cairo] The line still blurry after I follow "Frequently Asked Questions" guide

Uli Schlachter psychon at znc.in
Sun May 3 19:23:04 UTC 2020


Hi,

On 03.05.20 07:32, mustodo wrote:
> I searched and found a guide at official website.I readed the "Frequently Asked Questions" > "How do I draw a sharp, single-pixel-wide line?" and follow the guide

which guide do you mean exactly? Is it the one that says the following:

> Otherwise, if you really want to light up a single row of pixels at full> intensity, you can do that by adjusting the endpoints by 0.5 in the
> appropriate direction. For example, by changing the above code to:
> 
> cairo_move_to (cr, 10, 10.5);
> cairo_line_to (cr, 20, 10.5);
> cairo_set_line_width (cr, 1);
> cairo_stroke (cr);

So, could you change your code so that your coordinates end with ".5"?
By your example, it seems you are using integers:

> // userToDevice x=100.000000, y=500.000000, dx=100.000000, dy=500.000000
> // deviceToUser x=100.000000, y=500.000000, dx=100.000000, dy=500.000000

Cheers,
Uli
-- 
<alanc> I think someone had a Xprint version of glxgears at one point,
    but benchmarking how many GL pages you can print per second
    was deemed too silly to merge


More information about the cairo mailing list