diff --git a/libs/kimath/include/geometry/shape_circle.h b/libs/kimath/include/geometry/shape_circle.h index 4e4e4153f8..119474864b 100644 --- a/libs/kimath/include/geometry/shape_circle.h +++ b/libs/kimath/include/geometry/shape_circle.h @@ -106,7 +106,9 @@ public: void Rotate( double aAngle, const VECTOR2I& aCenter = { 0, 0 } ) override { - // That was easy.... + m_center -= aCenter; + m_center = m_center.Rotate( aAngle ); + m_center += aCenter; } bool IsSolid() const override diff --git a/libs/kimath/src/geometry/shape_arc.cpp b/libs/kimath/src/geometry/shape_arc.cpp index b8ff0001f8..178b97def1 100644 --- a/libs/kimath/src/geometry/shape_arc.cpp +++ b/libs/kimath/src/geometry/shape_arc.cpp @@ -279,13 +279,14 @@ void SHAPE_ARC::Rotate( double aAngle, const VECTOR2I& aCenter ) m_end -= aCenter; m_mid -= aCenter; - m_start.Rotate( aAngle ); - m_end.Rotate( aAngle ); - m_mid.Rotate( aAngle ); + m_start = m_start.Rotate( aAngle ); + m_end = m_end.Rotate( aAngle ); + m_mid = m_mid.Rotate( aAngle ); m_start += aCenter; m_end += aCenter; m_mid += aCenter; + update_bbox(); }