Loading common/drawpanel_gal.cpp +8 −5 Original line number Original line Diff line number Diff line Loading @@ -52,6 +52,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin wxWindow( aParentWindow, aWindowId, aPosition, aSize ) wxWindow( aParentWindow, aWindowId, aPosition, aSize ) { { m_gal = NULL; m_gal = NULL; m_currentGal = GAL_TYPE_NONE; m_view = NULL; m_view = NULL; m_painter = NULL; m_painter = NULL; Loading Loading @@ -158,7 +159,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) if( aGalType == m_currentGal && aUseShaders == m_useShaders && m_gal != NULL ) if( aGalType == m_currentGal && aUseShaders == m_useShaders && m_gal != NULL ) return; return; if( m_gal ) delete m_gal; delete m_gal; switch( aGalType ) switch( aGalType ) Loading @@ -171,6 +171,9 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) case GAL_TYPE_CAIRO: case GAL_TYPE_CAIRO: m_gal = new KiGfx::CAIRO_GAL( this, this, this ); m_gal = new KiGfx::CAIRO_GAL( this, this, this ); break; break; case GAL_TYPE_NONE: return; } } m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers Loading include/class_drawpanel_gal.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -50,6 +50,7 @@ class EDA_DRAW_PANEL_GAL : public wxWindow { { public: public: enum GalType { enum GalType { GAL_TYPE_NONE, ///< Not used GAL_TYPE_OPENGL, ///< OpenGL implementation GAL_TYPE_OPENGL, ///< OpenGL implementation GAL_TYPE_CAIRO, ///< Cairo implementation GAL_TYPE_CAIRO, ///< Cairo implementation }; }; Loading Loading
common/drawpanel_gal.cpp +8 −5 Original line number Original line Diff line number Diff line Loading @@ -52,6 +52,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin wxWindow( aParentWindow, aWindowId, aPosition, aSize ) wxWindow( aParentWindow, aWindowId, aPosition, aSize ) { { m_gal = NULL; m_gal = NULL; m_currentGal = GAL_TYPE_NONE; m_view = NULL; m_view = NULL; m_painter = NULL; m_painter = NULL; Loading Loading @@ -158,7 +159,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) if( aGalType == m_currentGal && aUseShaders == m_useShaders && m_gal != NULL ) if( aGalType == m_currentGal && aUseShaders == m_useShaders && m_gal != NULL ) return; return; if( m_gal ) delete m_gal; delete m_gal; switch( aGalType ) switch( aGalType ) Loading @@ -171,6 +171,9 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) case GAL_TYPE_CAIRO: case GAL_TYPE_CAIRO: m_gal = new KiGfx::CAIRO_GAL( this, this, this ); m_gal = new KiGfx::CAIRO_GAL( this, this, this ); break; break; case GAL_TYPE_NONE: return; } } m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers Loading
include/class_drawpanel_gal.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -50,6 +50,7 @@ class EDA_DRAW_PANEL_GAL : public wxWindow { { public: public: enum GalType { enum GalType { GAL_TYPE_NONE, ///< Not used GAL_TYPE_OPENGL, ///< OpenGL implementation GAL_TYPE_OPENGL, ///< OpenGL implementation GAL_TYPE_CAIRO, ///< Cairo implementation GAL_TYPE_CAIRO, ///< Cairo implementation }; }; Loading