[smooth] Variable type revision (part 2).

* src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
(gray_render_line) [FT_LONG64]: Updated.
(gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
(gray_convert_glyph_inner): Trace successes and failures.
This commit is contained in:
Alexei Podtelezhnikov 2016-07-04 23:46:53 -04:00
parent 5e353f0786
commit d1876e5832
2 changed files with 22 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2016-07-04 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Variable type revision (part 2).
* src/smooth/ftgrays.c (TArea): Restore original definition as `int'.
(gray_render_line) [FT_LONG64]: Updated.
(gray_convert_glyph): 32-bit band bisection stack should be 32 bands.
(gray_convert_glyph_inner): Trace successes and failures.
2016-07-04 Werner Lemberg <wl@gnu.org>
[autofit] Handle single-point contours as segments.

View File

@ -387,9 +387,9 @@ typedef ptrdiff_t FT_PtrDist;
/* need to define them to "float" or "double" when experimenting with */
/* new algorithms */
typedef int TCoord; /* integer scanline/pixel coordinate */
typedef long TPos; /* sub-pixel coordinate */
typedef long TArea; /* cell areas, coordinate products */
typedef int TCoord; /* integer scanline/pixel coordinate */
typedef int TArea; /* cell areas, coordinate products */
typedef struct TCell_* PCell;
@ -493,7 +493,7 @@ typedef ptrdiff_t FT_PtrDist;
printf( "%3d:", yindex );
for ( cell = ras.ycells[yindex]; cell != NULL; cell = cell->next )
printf( " (%3d, c:%4d, a:%6ld)",
printf( " (%3d, c:%4d, a:%6d)",
cell->x, cell->cover, cell->area );
printf( "\n" );
}
@ -928,7 +928,7 @@ typedef ptrdiff_t FT_PtrDist;
}
else /* any other line */
{
TArea prod = dx * fy1 - dy * fx1;
TPos prod = dx * fy1 - dy * fx1;
FT_UDIVPREP( dx );
FT_UDIVPREP( dy );
@ -1873,10 +1873,18 @@ typedef ptrdiff_t FT_PtrDist;
error = FT_Outline_Decompose( &ras.outline, &func_interface, &ras );
if ( !ras.invalid )
gray_record_cell( RAS_VAR );
FT_TRACE7(( "band [%d..%d]: %d cells\n",
ras.min_ey, ras.max_ey, ras.num_cells ));
}
else
{
error = FT_THROW( Memory_Overflow );
FT_TRACE7(( "band [%d..%d]: to be bisected\n",
ras.min_ey, ras.max_ey ));
}
return error;
}
@ -1886,7 +1894,7 @@ typedef ptrdiff_t FT_PtrDist;
{
TCell buffer[FT_MAX_GRAY_POOL];
const int band_size = FT_MAX_GRAY_POOL / 8;
gray_TBand bands[40];
gray_TBand bands[32];
gray_TBand* band;
int n, num_bands;
TCoord min, max, max_y;