Loading common/view/view.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,14 @@ VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const } double VIEW::ToWorld( double aSize ) const { const MATRIX3x3D& matrix = m_gal->GetScreenWorldMatrix(); return matrix.GetScale().x * aSize; } VECTOR2D VIEW::ToScreen( const VECTOR2D& aCoord, bool aAbsolute ) const { const MATRIX3x3D& matrix = m_gal->GetWorldScreenMatrix(); Loading include/tool/tool_event.h +2 −2 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ public: m_scope( aScope ), m_mouseButtons( 0 ) { if( aCategory == TC_COMMAND ) if( aCategory == TC_COMMAND || aCategory == TC_MESSAGE ) m_commandStr = aExtraParam; } Loading Loading @@ -317,7 +317,7 @@ public: if( !( m_actions & aEvent.m_actions ) ) return false; if( m_category == TC_COMMAND ) if( m_category == TC_COMMAND || m_category == TC_MESSAGE ) { if( m_commandStr && aEvent.m_commandStr ) return *m_commandStr == *aEvent.m_commandStr; Loading include/view/view.h +8 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,14 @@ public: */ VECTOR2D ToWorld( const VECTOR2D& aCoord, bool aAbsolute = true ) const; /** * Function ToWorld() * Converts a screen space one dimensional size to a one dimensional size in world * space coordinates. * @param aCoord: the size to be converted */ double ToWorld( double aSize ) const; /** * Function ToScreen() * Converts a world space point/vector to a point/vector in screen space coordinates. Loading pcbnew/class_drawsegment.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <PolyLine.h> #include <math_for_graphics.h> #include <trigo.h> #include <common.h> class LINE_READER; Loading pcbnew/tools/edit_tool.h +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ private: ///> Removes and frees a single BOARD_ITEM. void remove( BOARD_ITEM* aItem ); ///> Sets up handlers for various events ///> Sets up handlers for various events. void setTransitions(); ///> The required update flag for modified items Loading Loading
common/view/view.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,14 @@ VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const } double VIEW::ToWorld( double aSize ) const { const MATRIX3x3D& matrix = m_gal->GetScreenWorldMatrix(); return matrix.GetScale().x * aSize; } VECTOR2D VIEW::ToScreen( const VECTOR2D& aCoord, bool aAbsolute ) const { const MATRIX3x3D& matrix = m_gal->GetWorldScreenMatrix(); Loading
include/tool/tool_event.h +2 −2 Original line number Diff line number Diff line Loading @@ -189,7 +189,7 @@ public: m_scope( aScope ), m_mouseButtons( 0 ) { if( aCategory == TC_COMMAND ) if( aCategory == TC_COMMAND || aCategory == TC_MESSAGE ) m_commandStr = aExtraParam; } Loading Loading @@ -317,7 +317,7 @@ public: if( !( m_actions & aEvent.m_actions ) ) return false; if( m_category == TC_COMMAND ) if( m_category == TC_COMMAND || m_category == TC_MESSAGE ) { if( m_commandStr && aEvent.m_commandStr ) return *m_commandStr == *aEvent.m_commandStr; Loading
include/view/view.h +8 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,14 @@ public: */ VECTOR2D ToWorld( const VECTOR2D& aCoord, bool aAbsolute = true ) const; /** * Function ToWorld() * Converts a screen space one dimensional size to a one dimensional size in world * space coordinates. * @param aCoord: the size to be converted */ double ToWorld( double aSize ) const; /** * Function ToScreen() * Converts a world space point/vector to a point/vector in screen space coordinates. Loading
pcbnew/class_drawsegment.h +1 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ #include <PolyLine.h> #include <math_for_graphics.h> #include <trigo.h> #include <common.h> class LINE_READER; Loading
pcbnew/tools/edit_tool.h +1 −1 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ private: ///> Removes and frees a single BOARD_ITEM. void remove( BOARD_ITEM* aItem ); ///> Sets up handlers for various events ///> Sets up handlers for various events. void setTransitions(); ///> The required update flag for modified items Loading