* src/raster/ftraster.c (Line_Up, Bezier_Up): Check "between" earlier.

This commit is contained in:
Alexei Podtelezhnikov 2023-11-11 10:18:53 -05:00
parent 028b0d5c1b
commit 9cd403bc9f
1 changed files with 7 additions and 12 deletions

View File

@ -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;