[cairo] PATCH cairo-www: Simpler explanation for how to get sharp, single-pixel-wide lines

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Thu May 18 10:17:59 UTC 2017


On Thu, 18 May 2017 11:03:28 +0200, Guillermo Rodriguez Garcia wrote:

> 2017-05-18 9:24 GMT+02:00 Lawrence D'Oliveiro:
>
>> On Thu, 18 May 2017 09:08:16 +0200, Guillermo Rodriguez Garcia
>> wrote: 
>
>>> ... but unless you are writing an application that ONLY draws
>>> vertical and horizontal straight lines (which doesn't seem to be
>>> very common) it is pretty obvious that whoever has this problem
>>> would like to have a solution that does not affect everything
>>> else.  
>>
>> Which I addressed in my answer--please read it again.  
> 
> Nothing to add on my side.

In which case, let me quote myself:

    The drawback is that, if your lines are not exactly vertical or
    horizontal, you will get horrible “jaggies”. This is why
    antialiasing is on by default, and should be left that way for most
    text and shape drawing. To restore the default, end your aliased
    drawing sequence with

        cairo_set_antialias(cr, CAIRO_ANTIALIAS_DEFAULT);

So the question becomes: do you actually have a point that I haven’t
already addressed in my answer?


More information about the cairo mailing list