Update BASE_SCREEN to VECTOR2I

This commit is contained in:
Marek Roszko 2021-12-31 20:36:41 -05:00
parent 347e03363a
commit cadc0639eb
5 changed files with 11 additions and 9 deletions

View File

@ -395,9 +395,9 @@ bool SCH_PRINTOUT::OnBeginDocument( int startPage, int endPage )
*/
void SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen )
{
wxPoint tmp_startvisu;
VECTOR2I tmp_startvisu;
wxSize pageSizeIU; // Page size in internal units
wxPoint old_org;
VECTOR2I old_org;
wxRect fitRect;
wxDC* dc = GetDC();

View File

@ -503,9 +503,9 @@ void SCH_EDIT_FRAME::DrawCurrentSheetToClipboard()
// Set draw offset, zoom... to values needed to draw in the memory DC
// after saving initial values:
wxPoint tmp_startvisu = screen->m_StartVisu;
wxPoint old_org = screen->m_DrawOrg;
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
VECTOR2I tmp_startvisu = screen->m_StartVisu;
VECTOR2I old_org = screen->m_DrawOrg;
screen->m_DrawOrg.x = screen->m_DrawOrg.y = 0;
screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
wxMemoryDC dc;

View File

@ -85,12 +85,12 @@ public:
static wxString m_DrawingSheetFileName; ///< the name of the drawing sheet file, or empty
///< to use the default drawing sheet
wxPoint m_DrawOrg; ///< offsets for drawing the circuit on the screen
VECTOR2I m_DrawOrg; ///< offsets for drawing the circuit on the screen
VECTOR2D m_LocalOrigin; ///< Relative Screen cursor coordinate (on grid)
///< in user units. (coordinates from last reset position)
wxPoint m_StartVisu; ///< Coordinates in drawing units of the current
VECTOR2I m_StartVisu; ///< Coordinates in drawing units of the current
///< view position (upper left corner of device)
bool m_Center; ///< Center on screen. If true (0.0) is centered on screen

View File

@ -156,9 +156,9 @@ void PLEDITOR_PRINTOUT::GetPageInfo( int* minPage, int* maxPage,
void PLEDITOR_PRINTOUT::PrintPage( int aPageNum )
{
wxPoint tmp_startvisu;
VECTOR2I tmp_startvisu;
wxSize pageSizeIU; // Page size in internal units
wxPoint old_org;
VECTOR2I old_org;
wxRect fitRect;
wxDC* dc = GetDC();
BASE_SCREEN* screen = m_parent->GetScreen();

View File

@ -27,6 +27,7 @@
* Main file for the Eeschema tests to be compiled
*/
#include <boost/test/unit_test.hpp>
#include <kiplatform/app.h>
#include <pgm_base.h>
#include <wx/init.h>
@ -47,6 +48,7 @@ void wxAssertThrower( const wxString& aFile, int aLine, const wxString& aFunc,
bool init_unit_test()
{
KIPLATFORM::APP::Init();
boost::unit_test::framework::master_test_suite().p_name.value = "Common Eeschema module tests";
bool ok = wxInitialize( boost::unit_test::framework::master_test_suite().argc,