Loading common/gal/graphics_abstraction_layer.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -237,10 +237,10 @@ void GAL::DrawGrid() VECTOR2D GAL::GetGridPoint( const VECTOR2D& aPoint ) const { VECTOR2D pointWorld = ToWorld( aPoint ); VECTOR2D gridPoint; pointWorld.x = round( pointWorld.x / gridSize.x ) * gridSize.x; pointWorld.y = round( pointWorld.y / gridSize.y ) * gridSize.y; gridPoint.x = round( aPoint.x / gridSize.x ) * gridSize.x; gridPoint.y = round( aPoint.y / gridSize.y ) * gridSize.y; return ToScreen( pointWorld ); return gridPoint; } common/view/wx_view_controls.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const VECTOR2D mousePosition = GetMousePosition(); if( m_snappingEnabled ) return m_view->ToWorld( m_view->GetGAL()->GetGridPoint( mousePosition ) ); return m_view->GetGAL()->GetGridPoint( m_view->ToWorld( mousePosition ) ); else return m_view->ToWorld( mousePosition ); } Loading include/gal/graphics_abstraction_layer.h +3 −3 Original line number Diff line number Diff line Loading @@ -717,15 +717,15 @@ public: gridLineWidth = aGridLineWidth; } /// @brief Draw the grid ///> @brief Draw the grid void DrawGrid(); /** * Function GetGridPoint() * For a given point it returns the nearest point belonging to the grid in screen coordinates. * For a given point it returns the nearest point belonging to the grid in world coordinates. * * @param aPoint is the point for which the grid point is searched. * @return The nearest grid point in screen coordinates. * @return The nearest grid point in world coordinates. */ VECTOR2D GetGridPoint( const VECTOR2D& aPoint ) const; Loading Loading
common/gal/graphics_abstraction_layer.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -237,10 +237,10 @@ void GAL::DrawGrid() VECTOR2D GAL::GetGridPoint( const VECTOR2D& aPoint ) const { VECTOR2D pointWorld = ToWorld( aPoint ); VECTOR2D gridPoint; pointWorld.x = round( pointWorld.x / gridSize.x ) * gridSize.x; pointWorld.y = round( pointWorld.y / gridSize.y ) * gridSize.y; gridPoint.x = round( aPoint.x / gridSize.x ) * gridSize.x; gridPoint.y = round( aPoint.y / gridSize.y ) * gridSize.y; return ToScreen( pointWorld ); return gridPoint; }
common/view/wx_view_controls.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -247,7 +247,7 @@ VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const VECTOR2D mousePosition = GetMousePosition(); if( m_snappingEnabled ) return m_view->ToWorld( m_view->GetGAL()->GetGridPoint( mousePosition ) ); return m_view->GetGAL()->GetGridPoint( m_view->ToWorld( mousePosition ) ); else return m_view->ToWorld( mousePosition ); } Loading
include/gal/graphics_abstraction_layer.h +3 −3 Original line number Diff line number Diff line Loading @@ -717,15 +717,15 @@ public: gridLineWidth = aGridLineWidth; } /// @brief Draw the grid ///> @brief Draw the grid void DrawGrid(); /** * Function GetGridPoint() * For a given point it returns the nearest point belonging to the grid in screen coordinates. * For a given point it returns the nearest point belonging to the grid in world coordinates. * * @param aPoint is the point for which the grid point is searched. * @return The nearest grid point in screen coordinates. * @return The nearest grid point in world coordinates. */ VECTOR2D GetGridPoint( const VECTOR2D& aPoint ) const; Loading