From e9202737747ac008819d24a39c54584200c7a254 Mon Sep 17 00:00:00 2001 From: Alexei Podtelezhnikov Date: Sun, 5 Nov 2023 23:12:56 -0500 Subject: [PATCH] * src/raster/ftraster.c (Bezier_Up): Improve flow. --- src/raster/ftraster.c | 46 ++++++++++++++++--------------------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index 4af0b4db1..c2d8f5d2f 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -1123,7 +1123,7 @@ Long miny, Long maxy ) { - Long y1, y2, e, e2, e0, dy; + Long y1, y2, e, e2, dy; Long dx, x2; TPoint* start_arc; @@ -1138,40 +1138,28 @@ if ( y2 < miny || y1 > maxy ) goto Fin; - e2 = FLOOR( y2 ); - - if ( e2 > maxy ) - e2 = maxy; - - e0 = miny; - - if ( y1 < miny ) - e = miny; - else - { - e = CEILING( y1 ); - e0 = e; - - if ( FRAC( y1 ) == 0 ) - { - if ( ras.joint ) - { - top--; - ras.joint = FALSE; - } - - *top++ = arc[degree].x; - - e += ras.precision; - } - } + e2 = y2 > maxy ? maxy : FLOOR( y2 ); + e = y1 < miny ? miny : CEILING( y1 ); if ( ras.fresh ) { - ras.cProfile->start = (Int)TRUNC( e0 ); + ras.cProfile->start = (Int)TRUNC( e ); ras.fresh = FALSE; } + if ( y1 == e ) + { + if ( ras.joint ) + { + top--; + ras.joint = FALSE; + } + + *top++ = arc[degree].x; + + e += ras.precision; + } + if ( e2 < e ) goto Fin;