* src/raster/ftraster.c (Bezier_Up): Improve flow.

This commit is contained in:
Alexei Podtelezhnikov 2023-11-05 23:12:56 -05:00
parent 8a2ca26b41
commit e920273774
1 changed files with 17 additions and 29 deletions

View File

@ -1123,7 +1123,7 @@
Long miny, Long miny,
Long maxy ) Long maxy )
{ {
Long y1, y2, e, e2, e0, dy; Long y1, y2, e, e2, dy;
Long dx, x2; Long dx, x2;
TPoint* start_arc; TPoint* start_arc;
@ -1138,21 +1138,16 @@
if ( y2 < miny || y1 > maxy ) if ( y2 < miny || y1 > maxy )
goto Fin; goto Fin;
e2 = FLOOR( y2 ); e2 = y2 > maxy ? maxy : FLOOR( y2 );
e = y1 < miny ? miny : CEILING( y1 );
if ( e2 > maxy ) if ( ras.fresh )
e2 = maxy;
e0 = miny;
if ( y1 < miny )
e = miny;
else
{ {
e = CEILING( y1 ); ras.cProfile->start = (Int)TRUNC( e );
e0 = e; ras.fresh = FALSE;
}
if ( FRAC( y1 ) == 0 ) if ( y1 == e )
{ {
if ( ras.joint ) if ( ras.joint )
{ {
@ -1164,13 +1159,6 @@
e += ras.precision; e += ras.precision;
} }
}
if ( ras.fresh )
{
ras.cProfile->start = (Int)TRUNC( e0 );
ras.fresh = FALSE;
}
if ( e2 < e ) if ( e2 < e )
goto Fin; goto Fin;