Loading common/painter.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -64,14 +64,13 @@ void RENDER_SETTINGS::update() PAINTER::PAINTER( GAL* aGal ) : m_gal( aGal ), m_settings( NULL ), m_brightenedColor( 0.0, 1.0, 0.0, 0.9 ) m_gal( aGal ), m_brightenedColor( 0.0, 1.0, 0.0, 0.9 ) { } PAINTER::~PAINTER() { delete m_settings; } Loading @@ -91,7 +90,7 @@ void PAINTER::DrawBrightened( const VIEW_ITEM* aItem ) m_gal->PushDepth(); m_gal->SetLayerDepth( -1.0 ); // Draw semitransparent box that marks items as brightened // Draw an outline that marks items as brightened m_gal->SetIsStroke( true ); m_gal->SetLineWidth( 100000.0 ); m_gal->SetStrokeColor( m_brightenedColor ); Loading include/painter.h +4 −7 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ #include <gal/color4d.h> #include <colors.h> #include <boost/shared_ptr.hpp> class EDA_ITEM; class COLORS_DESIGN_SETTINGS; Loading Loading @@ -187,10 +187,7 @@ public: */ virtual void ApplySettings( RENDER_SETTINGS* aSettings ) { if( m_settings ) delete m_settings; m_settings = aSettings; m_settings.reset( aSettings ); } /** Loading @@ -207,7 +204,7 @@ public: */ virtual RENDER_SETTINGS* GetSettings() const { return m_settings; return m_settings.get(); } /** Loading @@ -233,7 +230,7 @@ protected: GAL* m_gal; /// Colors and display modes settings that are going to be used when drawing items. RENDER_SETTINGS* m_settings; boost::shared_ptr<RENDER_SETTINGS> m_settings; /// Color of brightened item frame COLOR4D m_brightenedColor; Loading pcbnew/pcb_painter.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,8 @@ void PCB_RENDER_SETTINGS::update() PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : PAINTER( aGal ) { m_settings.reset( new PCB_RENDER_SETTINGS() ); m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); } Loading pcbnew/pcb_painter.h +3 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #define __CLASS_PCB_PAINTER_H #include <layers_id_colors_and_visibility.h> #include <boost/shared_ptr.hpp> #include <painter.h> class EDA_ITEM; Loading Loading @@ -130,10 +131,11 @@ public: PAINTER::ApplySettings( aSettings ); // Store PCB specific render settings m_pcbSettings = dynamic_cast<PCB_RENDER_SETTINGS*>( aSettings ); m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); //dynamic_cast<PCB_RENDER_SETTINGS*>( aSettings ); } protected: /// Just a properly casted pointer to settings PCB_RENDER_SETTINGS* m_pcbSettings; // Drawing functions for various types of PCB-specific items Loading Loading
common/painter.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -64,14 +64,13 @@ void RENDER_SETTINGS::update() PAINTER::PAINTER( GAL* aGal ) : m_gal( aGal ), m_settings( NULL ), m_brightenedColor( 0.0, 1.0, 0.0, 0.9 ) m_gal( aGal ), m_brightenedColor( 0.0, 1.0, 0.0, 0.9 ) { } PAINTER::~PAINTER() { delete m_settings; } Loading @@ -91,7 +90,7 @@ void PAINTER::DrawBrightened( const VIEW_ITEM* aItem ) m_gal->PushDepth(); m_gal->SetLayerDepth( -1.0 ); // Draw semitransparent box that marks items as brightened // Draw an outline that marks items as brightened m_gal->SetIsStroke( true ); m_gal->SetLineWidth( 100000.0 ); m_gal->SetStrokeColor( m_brightenedColor ); Loading
include/painter.h +4 −7 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ #include <gal/color4d.h> #include <colors.h> #include <boost/shared_ptr.hpp> class EDA_ITEM; class COLORS_DESIGN_SETTINGS; Loading Loading @@ -187,10 +187,7 @@ public: */ virtual void ApplySettings( RENDER_SETTINGS* aSettings ) { if( m_settings ) delete m_settings; m_settings = aSettings; m_settings.reset( aSettings ); } /** Loading @@ -207,7 +204,7 @@ public: */ virtual RENDER_SETTINGS* GetSettings() const { return m_settings; return m_settings.get(); } /** Loading @@ -233,7 +230,7 @@ protected: GAL* m_gal; /// Colors and display modes settings that are going to be used when drawing items. RENDER_SETTINGS* m_settings; boost::shared_ptr<RENDER_SETTINGS> m_settings; /// Color of brightened item frame COLOR4D m_brightenedColor; Loading
pcbnew/pcb_painter.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -191,6 +191,8 @@ void PCB_RENDER_SETTINGS::update() PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : PAINTER( aGal ) { m_settings.reset( new PCB_RENDER_SETTINGS() ); m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); } Loading
pcbnew/pcb_painter.h +3 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #define __CLASS_PCB_PAINTER_H #include <layers_id_colors_and_visibility.h> #include <boost/shared_ptr.hpp> #include <painter.h> class EDA_ITEM; Loading Loading @@ -130,10 +131,11 @@ public: PAINTER::ApplySettings( aSettings ); // Store PCB specific render settings m_pcbSettings = dynamic_cast<PCB_RENDER_SETTINGS*>( aSettings ); m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); //dynamic_cast<PCB_RENDER_SETTINGS*>( aSettings ); } protected: /// Just a properly casted pointer to settings PCB_RENDER_SETTINGS* m_pcbSettings; // Drawing functions for various types of PCB-specific items Loading