freetype-devel
[Top][All Lists]
Advanced

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

[Devel] [patch] smooth/ftgrays.c:gray_render_scanline()


From: Giuliano Pochini
Subject: [Devel] [patch] smooth/ftgrays.c:gray_render_scanline()
Date: Fri, 18 Jan 2002 16:55:37 +0100 (CET)

This patch fixes a bug that causes very bad
rendering in some corner cases. Since y1 is
changed a few lines above, y2-y1 is not the
"dy" we need in the loop. Also when the
scanline goes left to right the error is
opposite than when it goes right to left. This
causes bad rendering of very thin polygons
(less than one pixel), while font rendering
is quite not affected because the hinter
makes gliphs at least one pixel wide.

I'm not on the list. Please cc: to me. Tnx.


--- old.c       Wed Jan 16 18:27:1
+++ freetype-2.0.6/src/smooth/ftgrays.c        Wed Jan 16 18:27:58 2002
@@ -553,7 +553,7 @@
 
     if ( ex1 != ex2 )
     {
-      p     = ONE_PIXEL * ( y2 - y1 );
+      p     = ONE_PIXEL * ( y2 - y1 + delta );
       lift  = p / dx;
       rem   = p % dx;
       if ( rem < 0 )



Bye.




reply via email to

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