From d5e8686dd80cf67146b623f2b8c68fc43776d85c Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sat, 11 Nov 2023 21:10:29 -0500 Subject: [PATCH] [raster] Get rid of the joint flag. * src/raster/ftraster.c (Line_Up, Bezier_Up): Deal with the scanline joints directly based on the initial y-coordinate. (New_Profile, black_TWorker): Remove the boolean flag. --- src/raster/ftraster.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index de1c35f5e..372d96f8a 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -466,9 +466,6 @@ Bool fresh; /* signals a fresh new profile which */ /* `start' field must be completed */ - Bool joint; /* signals that the last arc ended */ - /* exactly on a scanline. Allows */ - /* removal of doublets */ PProfile cProfile; /* current profile */ PProfile fProfile; /* head of linked list of profiles */ PProfile gProfile; /* contour's first profile in case */ @@ -684,7 +681,6 @@ ras.state = aState; ras.fresh = TRUE; - ras.joint = FALSE; return SUCCESS; } @@ -950,12 +946,9 @@ ras.cProfile->start = (Int)TRUNC( e ); ras.fresh = FALSE; } - - if ( y1 == e && ras.joint ) + else if ( y1 == e ) top--; - ras.joint = (Bool)( y2 == e2 ); - size = (Int)TRUNC( e2 - e ) + 1; if ( top + size >= ras.maxBuff ) @@ -1126,18 +1119,15 @@ ras.cProfile->start = (Int)TRUNC( e ); ras.fresh = FALSE; } + else if ( y1 == e ) + top--; if ( y1 == e ) { - if ( ras.joint ) - top--; - *top++ = arc[degree].x; e += ras.precision; } - ras.joint = (Bool)( y2 == e2 ); - if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) { ras.error = FT_THROW( Raster_Overflow );