* src/smooth/ftgrays.c (gray_hline): Simplify even-odd computations.

It is too bad the even-odd rule is not used much.
This commit is contained in:
Alexei Podtelezhnikov 2021-05-10 22:06:01 -04:00
parent 967a34eee3
commit b070264521
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2021-05-10 Alexei Podtelezhnikov <apodtele@gmail.com>
* src/smooth/ftgrays.c (gray_hline): Simplify even-odd computations.
It is too bad the even-odd rule is not used much.
2021-05-07 Alexei Podtelezhnikov <apodtele@gmail.com>
[type1] Avoid MM memory zeroing.

View File

@ -1182,10 +1182,10 @@ typedef ptrdiff_t FT_PtrDist;
/* compute the line's coverage depending on the outline fill rule */
if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )
{
coverage &= 511;
if ( coverage & 256 ) /* odd bit */
coverage = ~coverage;
if ( coverage >= 256 )
coverage = 511 - coverage;
/* higher bits discarded below */
}
else /* default non-zero winding rule */
{