Fix a few issues in plotting code. Fix bug in EDA_ANGLE::IsCardinal()

Fixes #10547
https://gitlab.com/kicad/code/kicad/issues/10547
This commit is contained in:
jean-pierre charras
2022-01-21 12:35:58 +01:00
parent c8a50d9b50
commit 0bc5cb33ed
5 changed files with 46 additions and 20 deletions
+1
View File
@@ -460,6 +460,7 @@ void PLOTTER::segmentAsOval( const VECTOR2I& start, const VECTOR2I& end, int aWi
VECTOR2I center( ( start.x + end.x ) / 2, ( start.y + end.y ) / 2 );
VECTOR2I size( end.x - start.x, end.y - start.y );
EDA_ANGLE orient( size );
orient = -orient; // this is due to our Y axis orientation
size.x = KiROUND( EuclideanNorm( size ) ) + aWidth;
size.y = aWidth;