[raster] Fix disappearing vertical lines (#54589).

* src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case
where both left and right outline exactly pass pixel centers.
This commit is contained in:
Werner Lemberg 2018-09-21 11:09:27 +02:00
parent 493aa68f5c
commit c168cc3b1b
2 changed files with 16 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2018-09-21 Werner Lemberg <wl@gnu.org>
[raster] Fix disappearing vertical lines (#54589).
* src/raster/ftraster.c (Vertical_Sweep_Span): Handle special case
where both left and right outline exactly pass pixel centers.
2018-09-20 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/base/ftobjs.c (ft_glyphslot_reset_bimap): Tiny rounding tweak.

View File

@ -2246,13 +2246,18 @@
/* Drop-out control */
e1 = TRUNC( CEILING( x1 ) );
e1 = CEILING( x1 );
e2 = FLOOR( x2 );
/* take care of the special case where both the left */
/* and right contour lie exactly on pixel centers */
if ( dropOutControl != 2 &&
x2 - x1 - ras.precision <= ras.precision_jitter )
x2 - x1 - ras.precision <= ras.precision_jitter &&
e1 != x1 && e2 != x2 )
e2 = e1;
else
e2 = TRUNC( FLOOR( x2 ) );
e1 = TRUNC( e1 );
e2 = TRUNC( e2 );
if ( e2 >= 0 && e1 < ras.bWidth )
{