diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2023-11-11 10:18:53 -0500 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2023-11-11 10:18:53 -0500 |
commit | 9cd403bc9f670603f5f0ce171fc8d470ec78e7be (patch) | |
tree | 5b43954c7302051bca3819e58e6de828ba007027 | |
parent | 028b0d5c1be1b1fe9305e073760ba6ac614ba6d8 (diff) | |
download | freetype-9cd403bc9f670603f5f0ce171fc8d470ec78e7be.tar.gz |
* src/raster/ftraster.c (Line_Up, Bezier_Up): Check "between" earlier.
-rw-r--r-- | src/raster/ftraster.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c index dd3858aea..de1c35f5e 100644 --- a/src/raster/ftraster.c +++ b/src/raster/ftraster.c @@ -942,6 +942,9 @@ e2 = y2 > maxy ? maxy : FLOOR( y2 ); e = y1 < miny ? miny : CEILING( y1 ); + if ( e2 < e ) /* between scanlines */ + goto Fin; + if ( ras.fresh ) { ras.cProfile->start = (Int)TRUNC( e ); @@ -953,9 +956,6 @@ ras.joint = (Bool)( y2 == e2 ); - if ( e2 < e ) - goto Fin; - size = (Int)TRUNC( e2 - e ) + 1; if ( top + size >= ras.maxBuff ) @@ -1105,8 +1105,6 @@ Long y1, y2, e, e2, dy; Long dx, x2; - TPoint* start_arc; - PLong top; @@ -1120,6 +1118,9 @@ e2 = y2 > maxy ? maxy : FLOOR( y2 ); e = y1 < miny ? miny : CEILING( y1 ); + if ( e2 < e ) /* between scanlines */ + goto Fin; + if ( ras.fresh ) { ras.cProfile->start = (Int)TRUNC( e ); @@ -1137,18 +1138,13 @@ ras.joint = (Bool)( y2 == e2 ); - if ( e2 < e ) - goto Fin; - if ( ( top + TRUNC( e2 - e ) + 1 ) >= ras.maxBuff ) { ras.error = FT_THROW( Raster_Overflow ); return FAILURE; } - start_arc = arc; - - do + while ( e <= e2 ) { y2 = arc[0].y; x2 = arc[0].x; @@ -1183,7 +1179,6 @@ arc -= degree; } } - while ( e <= e2 ); Fin: ras.top = top; |