freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another bug in grayscale renderer


From: David Turner
Subject: Re: Another bug in grayscale renderer
Date: Wed, 31 May 2000 22:37:52 +0200

Hi Boris,

  Thanks a lot for your fixes, I've applied them to the
  main repository and they should be available shortly..

Best Regards,

- David

> Boris Letocha a écrit :
> 
> Hello again!
> 
> When I render some selfintersecting polygons with ft_outline_even_odd_fill 
> flag one half of sides of polygons wasn't antialiased!
> 
> And I found the bug and fix :-)
> 
> I fix it on these lines in ftgrays.c:
> 
> lines 1070 to 1082 (more lines for better context):
> old:
>     if ( ras.outline.flags & ft_outline_even_odd_fill )
>     {
>       if (coverage < 0)
>         coverage = -coverage;
> 
>       while (coverage >= 512)
>         coverage -= 512;
> 
>       if (coverage > 256)
>         coverage = 0;
>       else if (coverage == 256)
>         coverage = 255;
>     }
> new:
>     if ( ras.outline.flags & ft_outline_even_odd_fill )
>     {
>       if (coverage < 0)
>         coverage = -coverage;
> 
>       while (coverage >= 512)
>         coverage -= 512;
> 
>       if (coverage > 256)
>         coverage = 512-coverage;    // <--------- here is only change
>       else if (coverage == 256)
>         coverage = 255;
>     }
> 
> description:
> function was:
>  /|   /|   /|   /|
> / |__/ |__/ |__/ |__
> 
> and I change it to be "more" symetrical:
>  /\  /\  /\  /\
> /  \/  \/  \/  \
> 
> now it look very good ...
> 
> Boris Letocha



reply via email to

[Prev in Thread] Current Thread [Next in Thread]