From 8e90a6167b5166a6a5e814c36b45e77362e0f4a2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 9 Jul 2014 13:50:27 +0200 Subject: [PATCH] Rotate support for pads. --- pcbnew/class_pad.cpp | 7 +++++++ pcbnew/class_pad.h | 1 + 2 files changed, 8 insertions(+) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 246a766c9d..ef2be10951 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -829,6 +829,13 @@ int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp ) } +void D_PAD::Rotate( const wxPoint& aRotCentre, double aAngle ) +{ + RotatePoint( &m_Pos, aRotCentre, aAngle ); + m_Orient += aAngle; +} + + wxString D_PAD::ShowPadShape() const { switch( GetShape() ) diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 53666d9e4c..7fc41f8dcd 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -400,6 +400,7 @@ public: SetLocalCoord(); } + void Rotate( const wxPoint& aRotCentre, double aAngle ); wxString GetSelectMenuText() const;