Loading include/layers_id_colors_and_visibility.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -240,6 +240,8 @@ enum PCB_VISIBLE PAD_BK_NETNAMES_VISIBLE, PAD_BK_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, GP_OVERLAY, // General purpose overlay END_PCB_VISIBLE_LIST // sentinel END_PCB_VISIBLE_LIST // sentinel }; }; Loading @@ -256,6 +258,7 @@ enum PCB_VISIBLE /// means that layer is displayed closer to the user, ie. on the top). /// means that layer is displayed closer to the user, ie. on the top). const LAYER_NUM GalLayerOrder[] = const LAYER_NUM GalLayerOrder[] = { { ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, Loading pcbnew/basepcbframe.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -831,6 +831,7 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KiGfx::TARGET_OVERLAY ); // Apply layer coloring scheme & display options // Apply layer coloring scheme & display options if( view->GetPainter() ) if( view->GetPainter() ) Loading pcbnew/tools/selection_area.cpp +8 −10 Original line number Original line Diff line number Diff line Loading @@ -49,13 +49,11 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const { { VECTOR2D width = m_view->ToWorld( VECTOR2D( 1.0, 1.0 ), false ); // fixme: pixel-sized stroke width setting? aGal->SetLineWidth( 1.0 ); aGal->SetLineWidth( width.x ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); aGal->SetFillColor( COLOR4D( 0.3, 0.3, 0.5, 0.3 ) ); aGal->SetFillColor( COLOR4D( 0.3, 0.3, 0.5, 0.3 ) ); aGal->SetIsStroke( true ); aGal->SetIsStroke( true ); aGal->SetIsFill( true ); aGal->SetIsFill( true ); aGal->SetLayerDepth(100.0); aGal->DrawRectangle( m_origin, m_end ); aGal->DrawRectangle( m_origin, m_end ); } } Loading pcbnew/tools/selection_area.h +3 −2 Original line number Original line Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include <view/view.h> #include <view/view.h> #include <gal/graphics_abstraction_layer.h> #include <gal/graphics_abstraction_layer.h> #include <base_struct.h> #include <base_struct.h> #include <layers_id_colors_and_visibility.h> /** /** * Class SELECTION_AREA * Class SELECTION_AREA Loading @@ -42,7 +43,7 @@ class SELECTION_AREA : public EDA_ITEM class SELECTION_AREA : public EDA_ITEM { { public: public: static const int SelectionLayer = 126; // fixme: define globally static const int SelectionLayer = ITEM_GAL_LAYER( GP_OVERLAY ); SELECTION_AREA(); SELECTION_AREA(); ~SELECTION_AREA() {}; ~SELECTION_AREA() {}; Loading pcbnew/tools/selection_tool.cpp +0 −4 Original line number Original line Diff line number Diff line Loading @@ -199,10 +199,6 @@ void SELECTION_TOOL::selectMultiple() m_selArea->SetEnd( evt->Position() ); m_selArea->SetEnd( evt->Position() ); m_selArea->ViewSetVisible( true ); m_selArea->ViewSetVisible( true ); m_selArea->ViewUpdate( VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY ); m_selArea->ViewUpdate( VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY ); v->SetLayerVisible( SELECTION_AREA::SelectionLayer ); v->SetLayerOrder( SELECTION_AREA::SelectionLayer, 1000 ); v->SetLayerTarget( SELECTION_AREA::SelectionLayer, TARGET_OVERLAY ); } } if( evt->IsMouseUp( MB_Left ) ) if( evt->IsMouseUp( MB_Left ) ) Loading Loading
include/layers_id_colors_and_visibility.h +3 −0 Original line number Original line Diff line number Diff line Loading @@ -240,6 +240,8 @@ enum PCB_VISIBLE PAD_BK_NETNAMES_VISIBLE, PAD_BK_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, GP_OVERLAY, // General purpose overlay END_PCB_VISIBLE_LIST // sentinel END_PCB_VISIBLE_LIST // sentinel }; }; Loading @@ -256,6 +258,7 @@ enum PCB_VISIBLE /// means that layer is displayed closer to the user, ie. on the top). /// means that layer is displayed closer to the user, ie. on the top). const LAYER_NUM GalLayerOrder[] = const LAYER_NUM GalLayerOrder[] = { { ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, Loading
pcbnew/basepcbframe.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -831,6 +831,7 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KiGfx::TARGET_OVERLAY ); // Apply layer coloring scheme & display options // Apply layer coloring scheme & display options if( view->GetPainter() ) if( view->GetPainter() ) Loading
pcbnew/tools/selection_area.cpp +8 −10 Original line number Original line Diff line number Diff line Loading @@ -49,13 +49,11 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const { { VECTOR2D width = m_view->ToWorld( VECTOR2D( 1.0, 1.0 ), false ); // fixme: pixel-sized stroke width setting? aGal->SetLineWidth( 1.0 ); aGal->SetLineWidth( width.x ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); aGal->SetFillColor( COLOR4D( 0.3, 0.3, 0.5, 0.3 ) ); aGal->SetFillColor( COLOR4D( 0.3, 0.3, 0.5, 0.3 ) ); aGal->SetIsStroke( true ); aGal->SetIsStroke( true ); aGal->SetIsFill( true ); aGal->SetIsFill( true ); aGal->SetLayerDepth(100.0); aGal->DrawRectangle( m_origin, m_end ); aGal->DrawRectangle( m_origin, m_end ); } } Loading
pcbnew/tools/selection_area.h +3 −2 Original line number Original line Diff line number Diff line Loading @@ -33,6 +33,7 @@ #include <view/view.h> #include <view/view.h> #include <gal/graphics_abstraction_layer.h> #include <gal/graphics_abstraction_layer.h> #include <base_struct.h> #include <base_struct.h> #include <layers_id_colors_and_visibility.h> /** /** * Class SELECTION_AREA * Class SELECTION_AREA Loading @@ -42,7 +43,7 @@ class SELECTION_AREA : public EDA_ITEM class SELECTION_AREA : public EDA_ITEM { { public: public: static const int SelectionLayer = 126; // fixme: define globally static const int SelectionLayer = ITEM_GAL_LAYER( GP_OVERLAY ); SELECTION_AREA(); SELECTION_AREA(); ~SELECTION_AREA() {}; ~SELECTION_AREA() {}; Loading
pcbnew/tools/selection_tool.cpp +0 −4 Original line number Original line Diff line number Diff line Loading @@ -199,10 +199,6 @@ void SELECTION_TOOL::selectMultiple() m_selArea->SetEnd( evt->Position() ); m_selArea->SetEnd( evt->Position() ); m_selArea->ViewSetVisible( true ); m_selArea->ViewSetVisible( true ); m_selArea->ViewUpdate( VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY ); m_selArea->ViewUpdate( VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY ); v->SetLayerVisible( SELECTION_AREA::SelectionLayer ); v->SetLayerOrder( SELECTION_AREA::SelectionLayer, 1000 ); v->SetLayerTarget( SELECTION_AREA::SelectionLayer, TARGET_OVERLAY ); } } if( evt->IsMouseUp( MB_Left ) ) if( evt->IsMouseUp( MB_Left ) ) Loading