Loading 3d-viewer/3d_draw.cpp +7 −6 Original line number Original line Diff line number Diff line Loading @@ -202,13 +202,14 @@ void Pcb3D_GLCanvas::Draw3D_Track(TRACK * track) /************************************************/ /************************************************/ { { double zpos; double zpos; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[track->m_Layer]; int layer = track->GetLayer(); int layer = track->m_Layer; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer]; double ox, oy, fx, fy; double ox, oy, fx, fy; double w; double w; if ( color & ITEM_NOT_SHOW ) return; if ( color & ITEM_NOT_SHOW ) return; if ( track->m_Layer == CMP_N ) layer = g_Parm_3D_Visu.m_Layers -1; if ( layer == CMP_N ) layer = g_Parm_3D_Visu.m_Layers -1; zpos = g_Parm_3D_Visu.m_LayerZcoord[layer]; zpos = g_Parm_3D_Visu.m_LayerZcoord[layer]; SetGLColor(color); SetGLColor(color); Loading Loading @@ -268,7 +269,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawSegment(DRAWSEGMENT * segment) int layer; int layer; double x, y, xf, yf; double x, y, xf, yf; double zpos, w; double zpos, w; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->m_Layer]; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->GetLayer()]; if ( color & ITEM_NOT_SHOW ) return; if ( color & ITEM_NOT_SHOW ) return; Loading @@ -279,7 +280,7 @@ int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->m_Layer]; xf = segment->m_End.x * g_Parm_3D_Visu.m_BoardScale; xf = segment->m_End.x * g_Parm_3D_Visu.m_BoardScale; yf = segment->m_End.y * g_Parm_3D_Visu.m_BoardScale; yf = segment->m_End.y * g_Parm_3D_Visu.m_BoardScale; if ( segment->m_Layer == EDGE_N) if ( segment->GetLayer() == EDGE_N) { { for ( layer = 0; layer < g_Parm_3D_Visu.m_Layers; layer++ ) for ( layer = 0; layer < g_Parm_3D_Visu.m_Layers; layer++ ) { { Loading @@ -291,7 +292,7 @@ int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->m_Layer]; else else { { zpos = g_Parm_3D_Visu.m_LayerZcoord[segment->m_Layer]; zpos = g_Parm_3D_Visu.m_LayerZcoord[segment->GetLayer()]; Draw3D_FilledSegment( x, -y, xf, -yf, w, zpos); Draw3D_FilledSegment( x, -y, xf, -yf, w, zpos); } } } } Loading change_log.txt +25 −5 Original line number Original line Diff line number Diff line Loading @@ -5,16 +5,36 @@ Please add newer entries at the top, list the date and your name with email address. email address. 2007-Aug-23 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ @todo add constructor initializers for classes that were derived from EDA_BaseLineStruct but are now not. Its late, will do tomorrow. @todo test yesterday's changes, it builds, may not run right yet. 2007-Aug-22 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Aug-22 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ================================================================================ + eeschema & pcbnew + eeschema & pcbnew Things are still pretty transient, should be stable a day or two: * Fixed a filename case sensitivity problem that would show up on Linux * Fixed a filename case sensitivity problem that would show up on Linux but probably not on Windows: bitmap/Reload.xpm needed uppercase R. but probably not on Windows: bitmap/Reload.xpm needed uppercase R. * Since so many classes introduced m_Layer, I moved m_Layer into * Wedged a new class BOARD_ITEM underneath all PCB drawable classes, this is EDA_BaseStruct so all classes can inherit it and that way we can test a big change and may introduce a bug or two, but it is worth it for the layer using a general, polymorphic test, i.e. don't have to cast a future, because we can introduce virtual functions there that do not impact EDA_BaseStruct* to a class specific pointer to test layer. Could also have the entire project (since everything is derived from EDA_BaseStruct). used a virtual function but too many places use m_Layer directly. The corresponding class in EESCHEMA seems to be DrawPartStruct, so we had nothing in PCBNEW like that. BOARD_ITEM::GetLayer() and SetLayer() introduced, more functions to come. Much of this work is geared towards making collectors.cpp's ARROWCOLLECTOR::Inspect() very very simple, and that can be model for future work. * Changed min() and max() macros to MIN() and MAX() because min() and max() are actually reserved according to the C++ standard! (and their usage prevented the use of #include <vector>). * Added files class_collector.h, collectors.h, and collectors.cpp. File collectors.cpp is still unfinished. * Started using a function and class comment style that will make sense to the Doxygen source code documenter program. * Beautified more un-beautified files. 2007-aug-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-aug-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> Loading common/base_struct.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -106,7 +106,6 @@ void EDA_BaseStruct::InitVars( void ) m_TimeStamp = 0; // Time stamp used for logical links m_TimeStamp = 0; // Time stamp used for logical links m_Status = 0; m_Status = 0; m_Selected = 0; /* Used by block commands, and selective editing */ m_Selected = 0; /* Used by block commands, and selective editing */ m_Layer = 0; } } Loading Loading @@ -283,6 +282,7 @@ std::ostream& EDA_BaseStruct::NestedSpace( int nestLevel, std::ostream& os ) #endif #endif /**********************************************************************************************/ /**********************************************************************************************/ EDA_BaseLineStruct::EDA_BaseLineStruct( EDA_BaseStruct* StructFather, DrawStructureType idtype ) : EDA_BaseLineStruct::EDA_BaseLineStruct( EDA_BaseStruct* StructFather, DrawStructureType idtype ) : EDA_BaseStruct( StructFather, idtype ) EDA_BaseStruct( StructFather, idtype ) Loading eeschema/class_hierarchy_sheet.cpp +251 −237 Original line number Original line Diff line number Diff line ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Name: sheet.cpp // Name: sheet.cpp // Purpose: // Purpose: // Author: jean-pierre Charras // Author: jean-pierre Charras Loading Loading @@ -45,8 +46,9 @@ DrawSheetStruct::DrawSheetStruct(const wxPoint & pos) : m_StructType = DRAW_SHEET_STRUCT_TYPE; m_StructType = DRAW_SHEET_STRUCT_TYPE; } } /**************************************/ /**************************************/ DrawSheetStruct::~DrawSheetStruct(void) DrawSheetStruct::~DrawSheetStruct() /**************************************/ /**************************************/ { { DrawSheetLabelStruct* label = m_Label, * next_label; DrawSheetLabelStruct* label = m_Label, * next_label; Loading @@ -63,11 +65,13 @@ DrawSheetLabelStruct * label = m_Label, * next_label; /***********************************************/ /***********************************************/ DrawSheetStruct* DrawSheetStruct::GenCopy( void ) DrawSheetStruct* DrawSheetStruct::GenCopy( void ) /***********************************************/ /***********************************************/ /* creates a copy of a sheet /* creates a copy of a sheet The linked data itself (EEDrawList) is not duplicated * The linked data itself (EEDrawList) is not duplicated */ */ { { DrawSheetStruct* newitem = new DrawSheetStruct( m_Pos ); DrawSheetStruct* newitem = new DrawSheetStruct( m_Pos ); DrawSheetLabelStruct* Slabel = NULL, * label = m_Label; DrawSheetLabelStruct* Slabel = NULL, * label = m_Label; newitem->m_Size = m_Size; newitem->m_Size = m_Size; Loading Loading @@ -129,8 +133,9 @@ DrawSheetLabelStruct * Slabel = NULL, * label = m_Label; /**********************************************************/ /**********************************************************/ void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem ) void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem ) /**********************************************************/ /**********************************************************/ /* Used if undo / redo command: /* Used if undo / redo command: swap data between this and copyitem * swap data between this and copyitem */ */ { { EXCHG( m_Pos, copyitem->m_Pos ); EXCHG( m_Pos, copyitem->m_Pos ); Loading @@ -142,6 +147,7 @@ void DrawSheetStruct::SwapData(DrawSheetStruct * copyitem) EXCHG( m_NbLabel, copyitem->m_NbLabel ); EXCHG( m_NbLabel, copyitem->m_NbLabel ); } } /**************************************************************************************/ /**************************************************************************************/ void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) int DrawMode, int Color ) Loading @@ -155,16 +161,20 @@ int color; wxPoint pos = m_Pos + offset; wxPoint pos = m_Pos + offset; int LineWidth = g_DrawMinimunLineWidth; int LineWidth = g_DrawMinimunLineWidth; if( Color >= 0 ) color = Color; if( Color >= 0 ) else color = ReturnLayerColor(m_Layer); color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode ); GRRect( &panel->m_ClipBox, DC, pos.x, pos.y, GRRect( &panel->m_ClipBox, DC, pos.x, pos.y, pos.x + m_Size.x, pos.y + m_Size.y, LineWidth, color ); pos.x + m_Size.x, pos.y + m_Size.y, LineWidth, color ); /* Draw text : SheetName */ /* Draw text : SheetName */ if( Color > 0 ) txtcolor = Color; if( Color > 0 ) else txtcolor = ReturnLayerColor(LAYER_SHEETNAME); txtcolor = Color; else txtcolor = ReturnLayerColor( LAYER_SHEETNAME ); Text = wxT( "Sheet: " ) + m_SheetName; Text = wxT( "Sheet: " ) + m_SheetName; DrawGraphicText( panel, DC, DrawGraphicText( panel, DC, Loading @@ -173,8 +183,10 @@ int LineWidth = g_DrawMinimunLineWidth; GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, LineWidth ); GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, LineWidth ); /* Draw text : FileName */ /* Draw text : FileName */ if( Color >= 0 ) txtcolor = Color; if( Color >= 0 ) else txtcolor = ReturnLayerColor(LAYER_SHEETFILENAME); txtcolor = Color; else txtcolor = ReturnLayerColor( LAYER_SHEETFILENAME ); Text = wxT( "File: " ) + m_FileName; Text = wxT( "File: " ) + m_FileName; DrawGraphicText( panel, DC, DrawGraphicText( panel, DC, wxPoint( pos.x, pos.y + m_Size.y + 4 ), wxPoint( pos.x, pos.y + m_Size.y + 4 ), Loading Loading @@ -212,6 +224,7 @@ DrawSheetLabelStruct::DrawSheetLabelStruct(DrawSheetStruct * parent, m_IsDangling = TRUE; m_IsDangling = TRUE; } } /***********************************************************/ /***********************************************************/ DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy( void ) DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy( void ) /***********************************************************/ /***********************************************************/ Loading @@ -226,7 +239,6 @@ DrawSheetLabelStruct * newitem = } } /********************************************************************************************/ /********************************************************************************************/ void DrawSheetLabelStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void DrawSheetLabelStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) int DrawMode, int Color ) Loading @@ -239,8 +251,10 @@ wxSize size; int NbSegm, coord[20]; int NbSegm, coord[20]; int LineWidth = g_DrawMinimunLineWidth; int LineWidth = g_DrawMinimunLineWidth; if( Color >= 0 ) txtcolor = Color; if( Color >= 0 ) else txtcolor = ReturnLayerColor(m_Layer); txtcolor = Color; else txtcolor = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode ); posx = m_Pos.x + offset.x; posy = m_Pos.y + offset.y; size = m_Size; posx = m_Pos.x + offset.x; posy = m_Pos.y + offset.y; size = m_Size; Loading Loading @@ -270,6 +284,7 @@ int LineWidth = g_DrawMinimunLineWidth; coord[0] = posx; coord[1] = posy; size2 = size.x / 2; coord[0] = posx; coord[1] = posy; size2 = size.x / 2; NbSegm = 0; NbSegm = 0; switch( m_Shape ) switch( m_Shape ) { { case 0: /* input |> */ case 0: /* input |> */ Loading Loading @@ -309,8 +324,7 @@ int LineWidth = g_DrawMinimunLineWidth; NbSegm = 6; NbSegm = 6; break; break; } } int FillShape = FALSE; int FillShape = FALSE; GRPoly( &panel->m_ClipBox, DC, NbSegm, coord, FillShape, LineWidth, txtcolor, txtcolor ); /* Poly Non rempli */ GRPoly( &panel->m_ClipBox, DC, NbSegm, coord, FillShape, LineWidth, txtcolor, txtcolor ); /* Poly Non rempli */ } } eeschema/class_screen.h +3 −2 Original line number Original line Diff line number Diff line Loading @@ -107,10 +107,10 @@ public: }; }; class DrawSheetLabelStruct : public EDA_BaseStruct class DrawSheetLabelStruct : public EDA_BaseStruct, public EDA_TextStruct , public EDA_TextStruct { { public: public: int m_Layer; int m_Edge, m_Shape; int m_Edge, m_Shape; bool m_IsDangling; // TRUE si non connect bool m_IsDangling; // TRUE si non connect Loading Loading @@ -141,6 +141,7 @@ public: int m_FileNameSize; int m_FileNameSize; wxPoint m_Pos; wxPoint m_Pos; wxSize m_Size; /* Position and Size of sheet symbol */ wxSize m_Size; /* Position and Size of sheet symbol */ int m_Layer; DrawSheetLabelStruct* m_Label; /* Points de connection */ DrawSheetLabelStruct* m_Label; /* Points de connection */ int m_NbLabel; /* Nombre de points de connexion */ int m_NbLabel; /* Nombre de points de connexion */ Loading Loading
3d-viewer/3d_draw.cpp +7 −6 Original line number Original line Diff line number Diff line Loading @@ -202,13 +202,14 @@ void Pcb3D_GLCanvas::Draw3D_Track(TRACK * track) /************************************************/ /************************************************/ { { double zpos; double zpos; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[track->m_Layer]; int layer = track->GetLayer(); int layer = track->m_Layer; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[layer]; double ox, oy, fx, fy; double ox, oy, fx, fy; double w; double w; if ( color & ITEM_NOT_SHOW ) return; if ( color & ITEM_NOT_SHOW ) return; if ( track->m_Layer == CMP_N ) layer = g_Parm_3D_Visu.m_Layers -1; if ( layer == CMP_N ) layer = g_Parm_3D_Visu.m_Layers -1; zpos = g_Parm_3D_Visu.m_LayerZcoord[layer]; zpos = g_Parm_3D_Visu.m_LayerZcoord[layer]; SetGLColor(color); SetGLColor(color); Loading Loading @@ -268,7 +269,7 @@ void Pcb3D_GLCanvas::Draw3D_DrawSegment(DRAWSEGMENT * segment) int layer; int layer; double x, y, xf, yf; double x, y, xf, yf; double zpos, w; double zpos, w; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->m_Layer]; int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->GetLayer()]; if ( color & ITEM_NOT_SHOW ) return; if ( color & ITEM_NOT_SHOW ) return; Loading @@ -279,7 +280,7 @@ int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->m_Layer]; xf = segment->m_End.x * g_Parm_3D_Visu.m_BoardScale; xf = segment->m_End.x * g_Parm_3D_Visu.m_BoardScale; yf = segment->m_End.y * g_Parm_3D_Visu.m_BoardScale; yf = segment->m_End.y * g_Parm_3D_Visu.m_BoardScale; if ( segment->m_Layer == EDGE_N) if ( segment->GetLayer() == EDGE_N) { { for ( layer = 0; layer < g_Parm_3D_Visu.m_Layers; layer++ ) for ( layer = 0; layer < g_Parm_3D_Visu.m_Layers; layer++ ) { { Loading @@ -291,7 +292,7 @@ int color = g_Parm_3D_Visu.m_BoardSettings->m_LayerColor[segment->m_Layer]; else else { { zpos = g_Parm_3D_Visu.m_LayerZcoord[segment->m_Layer]; zpos = g_Parm_3D_Visu.m_LayerZcoord[segment->GetLayer()]; Draw3D_FilledSegment( x, -y, xf, -yf, w, zpos); Draw3D_FilledSegment( x, -y, xf, -yf, w, zpos); } } } } Loading
change_log.txt +25 −5 Original line number Original line Diff line number Diff line Loading @@ -5,16 +5,36 @@ Please add newer entries at the top, list the date and your name with email address. email address. 2007-Aug-23 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ @todo add constructor initializers for classes that were derived from EDA_BaseLineStruct but are now not. Its late, will do tomorrow. @todo test yesterday's changes, it builds, may not run right yet. 2007-Aug-22 UPDATE Dick Hollenbeck <dick@softplc.com> 2007-Aug-22 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ================================================================================ + eeschema & pcbnew + eeschema & pcbnew Things are still pretty transient, should be stable a day or two: * Fixed a filename case sensitivity problem that would show up on Linux * Fixed a filename case sensitivity problem that would show up on Linux but probably not on Windows: bitmap/Reload.xpm needed uppercase R. but probably not on Windows: bitmap/Reload.xpm needed uppercase R. * Since so many classes introduced m_Layer, I moved m_Layer into * Wedged a new class BOARD_ITEM underneath all PCB drawable classes, this is EDA_BaseStruct so all classes can inherit it and that way we can test a big change and may introduce a bug or two, but it is worth it for the layer using a general, polymorphic test, i.e. don't have to cast a future, because we can introduce virtual functions there that do not impact EDA_BaseStruct* to a class specific pointer to test layer. Could also have the entire project (since everything is derived from EDA_BaseStruct). used a virtual function but too many places use m_Layer directly. The corresponding class in EESCHEMA seems to be DrawPartStruct, so we had nothing in PCBNEW like that. BOARD_ITEM::GetLayer() and SetLayer() introduced, more functions to come. Much of this work is geared towards making collectors.cpp's ARROWCOLLECTOR::Inspect() very very simple, and that can be model for future work. * Changed min() and max() macros to MIN() and MAX() because min() and max() are actually reserved according to the C++ standard! (and their usage prevented the use of #include <vector>). * Added files class_collector.h, collectors.h, and collectors.cpp. File collectors.cpp is still unfinished. * Started using a function and class comment style that will make sense to the Doxygen source code documenter program. * Beautified more un-beautified files. 2007-aug-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2007-aug-21 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> Loading
common/base_struct.cpp +1 −1 Original line number Original line Diff line number Diff line Loading @@ -106,7 +106,6 @@ void EDA_BaseStruct::InitVars( void ) m_TimeStamp = 0; // Time stamp used for logical links m_TimeStamp = 0; // Time stamp used for logical links m_Status = 0; m_Status = 0; m_Selected = 0; /* Used by block commands, and selective editing */ m_Selected = 0; /* Used by block commands, and selective editing */ m_Layer = 0; } } Loading Loading @@ -283,6 +282,7 @@ std::ostream& EDA_BaseStruct::NestedSpace( int nestLevel, std::ostream& os ) #endif #endif /**********************************************************************************************/ /**********************************************************************************************/ EDA_BaseLineStruct::EDA_BaseLineStruct( EDA_BaseStruct* StructFather, DrawStructureType idtype ) : EDA_BaseLineStruct::EDA_BaseLineStruct( EDA_BaseStruct* StructFather, DrawStructureType idtype ) : EDA_BaseStruct( StructFather, idtype ) EDA_BaseStruct( StructFather, idtype ) Loading
eeschema/class_hierarchy_sheet.cpp +251 −237 Original line number Original line Diff line number Diff line ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Name: sheet.cpp // Name: sheet.cpp // Purpose: // Purpose: // Author: jean-pierre Charras // Author: jean-pierre Charras Loading Loading @@ -45,8 +46,9 @@ DrawSheetStruct::DrawSheetStruct(const wxPoint & pos) : m_StructType = DRAW_SHEET_STRUCT_TYPE; m_StructType = DRAW_SHEET_STRUCT_TYPE; } } /**************************************/ /**************************************/ DrawSheetStruct::~DrawSheetStruct(void) DrawSheetStruct::~DrawSheetStruct() /**************************************/ /**************************************/ { { DrawSheetLabelStruct* label = m_Label, * next_label; DrawSheetLabelStruct* label = m_Label, * next_label; Loading @@ -63,11 +65,13 @@ DrawSheetLabelStruct * label = m_Label, * next_label; /***********************************************/ /***********************************************/ DrawSheetStruct* DrawSheetStruct::GenCopy( void ) DrawSheetStruct* DrawSheetStruct::GenCopy( void ) /***********************************************/ /***********************************************/ /* creates a copy of a sheet /* creates a copy of a sheet The linked data itself (EEDrawList) is not duplicated * The linked data itself (EEDrawList) is not duplicated */ */ { { DrawSheetStruct* newitem = new DrawSheetStruct( m_Pos ); DrawSheetStruct* newitem = new DrawSheetStruct( m_Pos ); DrawSheetLabelStruct* Slabel = NULL, * label = m_Label; DrawSheetLabelStruct* Slabel = NULL, * label = m_Label; newitem->m_Size = m_Size; newitem->m_Size = m_Size; Loading Loading @@ -129,8 +133,9 @@ DrawSheetLabelStruct * Slabel = NULL, * label = m_Label; /**********************************************************/ /**********************************************************/ void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem ) void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem ) /**********************************************************/ /**********************************************************/ /* Used if undo / redo command: /* Used if undo / redo command: swap data between this and copyitem * swap data between this and copyitem */ */ { { EXCHG( m_Pos, copyitem->m_Pos ); EXCHG( m_Pos, copyitem->m_Pos ); Loading @@ -142,6 +147,7 @@ void DrawSheetStruct::SwapData(DrawSheetStruct * copyitem) EXCHG( m_NbLabel, copyitem->m_NbLabel ); EXCHG( m_NbLabel, copyitem->m_NbLabel ); } } /**************************************************************************************/ /**************************************************************************************/ void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void DrawSheetStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) int DrawMode, int Color ) Loading @@ -155,16 +161,20 @@ int color; wxPoint pos = m_Pos + offset; wxPoint pos = m_Pos + offset; int LineWidth = g_DrawMinimunLineWidth; int LineWidth = g_DrawMinimunLineWidth; if( Color >= 0 ) color = Color; if( Color >= 0 ) else color = ReturnLayerColor(m_Layer); color = Color; else color = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode ); GRRect( &panel->m_ClipBox, DC, pos.x, pos.y, GRRect( &panel->m_ClipBox, DC, pos.x, pos.y, pos.x + m_Size.x, pos.y + m_Size.y, LineWidth, color ); pos.x + m_Size.x, pos.y + m_Size.y, LineWidth, color ); /* Draw text : SheetName */ /* Draw text : SheetName */ if( Color > 0 ) txtcolor = Color; if( Color > 0 ) else txtcolor = ReturnLayerColor(LAYER_SHEETNAME); txtcolor = Color; else txtcolor = ReturnLayerColor( LAYER_SHEETNAME ); Text = wxT( "Sheet: " ) + m_SheetName; Text = wxT( "Sheet: " ) + m_SheetName; DrawGraphicText( panel, DC, DrawGraphicText( panel, DC, Loading @@ -173,8 +183,10 @@ int LineWidth = g_DrawMinimunLineWidth; GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, LineWidth ); GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, LineWidth ); /* Draw text : FileName */ /* Draw text : FileName */ if( Color >= 0 ) txtcolor = Color; if( Color >= 0 ) else txtcolor = ReturnLayerColor(LAYER_SHEETFILENAME); txtcolor = Color; else txtcolor = ReturnLayerColor( LAYER_SHEETFILENAME ); Text = wxT( "File: " ) + m_FileName; Text = wxT( "File: " ) + m_FileName; DrawGraphicText( panel, DC, DrawGraphicText( panel, DC, wxPoint( pos.x, pos.y + m_Size.y + 4 ), wxPoint( pos.x, pos.y + m_Size.y + 4 ), Loading Loading @@ -212,6 +224,7 @@ DrawSheetLabelStruct::DrawSheetLabelStruct(DrawSheetStruct * parent, m_IsDangling = TRUE; m_IsDangling = TRUE; } } /***********************************************************/ /***********************************************************/ DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy( void ) DrawSheetLabelStruct* DrawSheetLabelStruct::GenCopy( void ) /***********************************************************/ /***********************************************************/ Loading @@ -226,7 +239,6 @@ DrawSheetLabelStruct * newitem = } } /********************************************************************************************/ /********************************************************************************************/ void DrawSheetLabelStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, void DrawSheetLabelStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int DrawMode, int Color ) int DrawMode, int Color ) Loading @@ -239,8 +251,10 @@ wxSize size; int NbSegm, coord[20]; int NbSegm, coord[20]; int LineWidth = g_DrawMinimunLineWidth; int LineWidth = g_DrawMinimunLineWidth; if( Color >= 0 ) txtcolor = Color; if( Color >= 0 ) else txtcolor = ReturnLayerColor(m_Layer); txtcolor = Color; else txtcolor = ReturnLayerColor( m_Layer ); GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode ); posx = m_Pos.x + offset.x; posy = m_Pos.y + offset.y; size = m_Size; posx = m_Pos.x + offset.x; posy = m_Pos.y + offset.y; size = m_Size; Loading Loading @@ -270,6 +284,7 @@ int LineWidth = g_DrawMinimunLineWidth; coord[0] = posx; coord[1] = posy; size2 = size.x / 2; coord[0] = posx; coord[1] = posy; size2 = size.x / 2; NbSegm = 0; NbSegm = 0; switch( m_Shape ) switch( m_Shape ) { { case 0: /* input |> */ case 0: /* input |> */ Loading Loading @@ -309,8 +324,7 @@ int LineWidth = g_DrawMinimunLineWidth; NbSegm = 6; NbSegm = 6; break; break; } } int FillShape = FALSE; int FillShape = FALSE; GRPoly( &panel->m_ClipBox, DC, NbSegm, coord, FillShape, LineWidth, txtcolor, txtcolor ); /* Poly Non rempli */ GRPoly( &panel->m_ClipBox, DC, NbSegm, coord, FillShape, LineWidth, txtcolor, txtcolor ); /* Poly Non rempli */ } }
eeschema/class_screen.h +3 −2 Original line number Original line Diff line number Diff line Loading @@ -107,10 +107,10 @@ public: }; }; class DrawSheetLabelStruct : public EDA_BaseStruct class DrawSheetLabelStruct : public EDA_BaseStruct, public EDA_TextStruct , public EDA_TextStruct { { public: public: int m_Layer; int m_Edge, m_Shape; int m_Edge, m_Shape; bool m_IsDangling; // TRUE si non connect bool m_IsDangling; // TRUE si non connect Loading Loading @@ -141,6 +141,7 @@ public: int m_FileNameSize; int m_FileNameSize; wxPoint m_Pos; wxPoint m_Pos; wxSize m_Size; /* Position and Size of sheet symbol */ wxSize m_Size; /* Position and Size of sheet symbol */ int m_Layer; DrawSheetLabelStruct* m_Label; /* Points de connection */ DrawSheetLabelStruct* m_Label; /* Points de connection */ int m_NbLabel; /* Nombre de points de connexion */ int m_NbLabel; /* Nombre de points de connexion */ Loading