Fix odd/even check in cairo. Modulo 1 is always 0 on ints.

This commit is contained in:
Marek Roszko 2021-01-31 11:59:49 -05:00
parent 39fb968820
commit 9770ba9739
1 changed files with 2 additions and 2 deletions

View File

@ -317,7 +317,7 @@ void CAIRO_GAL_BASE::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, doub
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
lineWidthIsOdd = !( static_cast<int>( aRadius ) % 1 );
lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
auto mid = roundp( xform( aCenterPoint ) );
@ -366,7 +366,7 @@ void CAIRO_GAL_BASE::DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadiu
// point that changes both endpoints. In the worst case, this is twice as far.
// We cannot adjust radius or center based on the other because this causes the
// whole arc to change position/size
lineWidthIsOdd = !( static_cast<int>( aRadius ) % 1 );
lineWidthIsOdd = !( static_cast<int>( aRadius ) % 2 );
auto mid = roundp( xform( aCenterPoint ) );
double width = xform( aWidth / 2.0 );