Plotters: make virtual void PLOTTER::Arc() using arc angles protected.

Using arc angles to plot an arc is really error prone due to different
options between plotters, and angles defined in Kicad, using this version of
arc plotting from Kicad is no longer allowed in Kicad code.
This commit is contained in:
jean-pierre charras
2022-09-20 18:55:20 +02:00
parent fd4cd17f4f
commit f851526c67
8 changed files with 60 additions and 64 deletions
+3 -3
View File
@@ -161,9 +161,9 @@ void PLOTTER::Arc( const VECTOR2I& aCenter, const VECTOR2I& aStart, const VECTOR
startAngle = startAngle.Normalize() - ANGLE_360;
}
// In Kicad code, call to Arc() using angles call this function after
// sawpping angles and negate them (to compensate the inverted Y axis).
// So to mimic the other calls in Kicad, do the same thing
// In old Kicad code, calls to Arc() using angles calls this function after
// swapping angles and negate them (to compensate the inverted Y axis).
// So to be compatible with Arc() calls with angles, do the same thing
std::swap( startAngle, endAngle );
startAngle = -startAngle;
endAngle = -endAngle;