freetype
[Top][All Lists]
Advanced

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

Small bug in grayscale renderer


From: Boris Letocha
Subject: Small bug in grayscale renderer
Date: Wed, 31 May 2000 13:56:17 +0200

Hello font gods :-)

I want to use your grayscale renderer for my library to draw aa polygons.
I rewrited it to C++. Everything is ok. But when you specify nonzero min_ex it draws on wrong horizontal position every time from left side.

I fix it on these lines in ftgrays.c:
line 1093:
old:
    y += ras.min_ey;
new:
    y += ras.min_ey; x += ras.min_ex;

lines 1200 and 1201:
old:
        if (cover && x < ras.max_ex)
          grays_hline( RAS_VAR_ x, y, cover*(ONE_PIXEL*2), ras.max_ex - x );
new:
        if (cover && x < ras.max_ex - ras.min_ex)
          grays_hline( RAS_VAR_ x, y, cover*(ONE_PIXEL*2), ras.max_ex - ras.min_ex - x );

little bug in comment on line 282:
old:
  /* the new horizontal position must be strictly less than max_ey       */
new:
  /* the new horizontal position must be strictly less than max_ex       */

Now it draws polygons corectly...

Big thanks for great library...

Boris Letocha


reply via email to

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