← Back to team overview

kicad-developers team mailing list archive

Re: [patch] GAL pixel alignment

 

Am 2019-02-10 17:26, schrieb Tomasz Wlostowski:
Hi,

The 3 attached patches add pixel alignment while drawing strokes in GAL
(both Cairo and OpenGL), resulting in sharp and uniform width lines
regardless of the zoom level and antialiasing settings. Current GAL
canvas does not round geometry to integer pixel coordinates, resulting
in sometimes blurred or jagged lines. I encourage you to test them,
especially at the OpenGL version (as it relies on the Vertex Shader for
the rounding/alignment).

@Wayne do you think these can make to 5.1 (I guess it's too late) or
should we postpone them to V6?

Cheers,
Tom

Hi Tom-

This is a clever approach.  Nicely done.  Couple comments:

1) The blue stroke/green circle on the bitmaps is a bit unclear of purpose (fallback mode). It is drawn behind the bitmap, so you only see it with a masked/alpha bitmap but I think we should not draw it. The green circle is cleared after placing but the blue outline remains.

2) Do we need to trim a 1/10th of a radian when drawing the cairo circle in order to close the path? Is there a reason drawing the full circle is broken?

Overall, this is very nice. Definitely checks a big box for GAL on Eeschema. I see no issues with it on Debian Buster.

-Seth


Follow ups

References