[raster] Clean up contour indexing.
* src/raster/ftraster.c (Decompose_Curve, Convert_Glyph): Use consistent index types (Int) and compact iterations.
This commit is contained in:
parent
7f9499044e
commit
3f01161ff2
@ -1742,9 +1742,9 @@
|
||||
* SUCCESS on success, FAILURE on error.
|
||||
*/
|
||||
static Bool
|
||||
Decompose_Curve( RAS_ARGS UShort first,
|
||||
UShort last,
|
||||
Int flipped )
|
||||
Decompose_Curve( RAS_ARGS Int first,
|
||||
Int last,
|
||||
Int flipped )
|
||||
{
|
||||
FT_Vector v_last;
|
||||
FT_Vector v_control;
|
||||
@ -1969,8 +1969,8 @@
|
||||
static Bool
|
||||
Convert_Glyph( RAS_ARGS Int flipped )
|
||||
{
|
||||
Int i;
|
||||
UInt start;
|
||||
Int i;
|
||||
Int first, last;
|
||||
|
||||
|
||||
ras.fProfile = NULL;
|
||||
@ -1985,8 +1985,7 @@
|
||||
ras.cProfile->offset = ras.top;
|
||||
ras.num_Profs = 0;
|
||||
|
||||
start = 0;
|
||||
|
||||
last = -1;
|
||||
for ( i = 0; i < ras.outline.n_contours; i++ )
|
||||
{
|
||||
PProfile lastProfile;
|
||||
@ -1996,12 +1995,11 @@
|
||||
ras.state = Unknown_State;
|
||||
ras.gProfile = NULL;
|
||||
|
||||
if ( Decompose_Curve( RAS_VARS (UShort)start,
|
||||
(UShort)ras.outline.contours[i],
|
||||
flipped ) )
|
||||
return FAILURE;
|
||||
first = last + 1;
|
||||
last = ras.outline.contours[i];
|
||||
|
||||
start = (UShort)ras.outline.contours[i] + 1;
|
||||
if ( Decompose_Curve( RAS_VARS first, last, flipped ) )
|
||||
return FAILURE;
|
||||
|
||||
/* we must now check whether the extreme arcs join or not */
|
||||
if ( FRAC( ras.lastY ) == 0 &&
|
||||
|
Loading…
Reference in New Issue
Block a user