Loading eeschema/class_BodyItem_Text.cpp +19 −13 Original line number Original line Diff line number Diff line Loading @@ -189,26 +189,32 @@ LibDrawText* LibDrawText::GenCopy() } } void LibDrawText::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, /** Function GetPenSize const wxPoint& aOffset, int aColor, int aDrawMode, * @return the size of the "pen" that be used to draw or plot this item void* aData, const int aTransformMatrix[2][2] ) */ int LibDrawText::GetPenSize( ) { { wxPoint pos1, pos2; int pensize = m_Width; int color = ReturnLayerColor( LAYER_DEVICE ); int linewidth = m_Width; if( linewidth == 0 ) // Use default values for pen size if( pensize == 0 ) // Use default values for pen size { { if( m_Bold ) if( m_Bold ) linewidth = GetPenSizeForBold( m_Size.x ); pensize = GetPenSizeForBold( m_Size.x ); else else linewidth = g_DrawDefaultLineThickness; pensize = g_DrawDefaultLineThickness; } } // Clip pen size for small texts: // Clip pen size for small texts: linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold ); pensize = Clamp_Text_PenSize( pensize, m_Size, m_Bold ); return pensize; } void LibDrawText::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const int aTransformMatrix[2][2] ) { wxPoint pos1, pos2; int color = ReturnLayerColor( LAYER_DEVICE ); if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color { { if( ( m_Selected & IS_SELECTED ) ) if( ( m_Selected & IS_SELECTED ) ) Loading @@ -226,7 +232,7 @@ void LibDrawText::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, DrawGraphicText( aPanel, aDC, pos1, (EDA_Colors) color, m_Text, DrawGraphicText( aPanel, aDC, pos1, (EDA_Colors) color, m_Text, t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT, t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT, m_Size, m_HJustify, m_VJustify, m_Size, m_HJustify, m_VJustify, linewidth, m_Italic, m_Bold ); GetPenSize( ), m_Italic, m_Bold ); } } Loading eeschema/class_libentry_fields.cpp +12 −1 Original line number Original line Diff line number Diff line Loading @@ -202,6 +202,17 @@ bool LibDrawField::Load( char* line, wxString& errorMsg ) } } /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item */ int LibDrawField::GetPenSize( ) { int pensize = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; return pensize; } /* /* * if aData not NULL, aData must point a wxString which is used instead of * if aData not NULL, aData must point a wxString which is used instead of * the m_Text * the m_Text Loading @@ -213,7 +224,7 @@ void LibDrawField::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, wxPoint text_pos; wxPoint text_pos; int color = aColor; int color = aColor; int linewidth = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; int linewidth = GetPenSize( ); linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold ); linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold ); Loading eeschema/class_libentry_fields.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,11 @@ public: } } /** Function GetPenSize virtual pure * @return the size of the "pen" that be used to draw or plot this item */ int GetPenSize( ); /** /** * Function Save * Function Save * writes the data structures for this object out to a FILE in "*.brd" * writes the data structures for this object out to a FILE in "*.brd" Loading eeschema/class_pin.cpp +13 −3 Original line number Original line Diff line number Diff line Loading @@ -276,6 +276,16 @@ bool LibDrawPin::Load( char* line, wxString& errorMsg ) } } /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item */ int LibDrawPin::GetPenSize( ) { int pensize = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; return pensize; } /**********************************************************************************************/ /**********************************************************************************************/ void LibDrawPin::Draw( WinEDA_DrawPanel* aPanel, void LibDrawPin::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, wxDC* aDC, Loading Loading @@ -334,7 +344,7 @@ void LibDrawPin::DrawPinSymbol( WinEDA_DrawPanel* aPanel, { { int MapX1, MapY1, x1, y1; int MapX1, MapY1, x1, y1; int color; int color; int width = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; int width = GetPenSize( ); int posX = aPinPos.x, posY = aPinPos.y, len = m_PinLen; int posX = aPinPos.x, posY = aPinPos.y, len = m_PinLen; BASE_SCREEN* screen = aPanel->GetScreen(); BASE_SCREEN* screen = aPanel->GetScreen(); Loading Loading @@ -510,10 +520,10 @@ void LibDrawPin::DrawPinTexts( WinEDA_DrawPanel* panel, wxSize PinNameSize( m_PinNameSize, m_PinNameSize ); wxSize PinNameSize( m_PinNameSize, m_PinNameSize ); wxSize PinNumSize( m_PinNumSize, m_PinNumSize ); wxSize PinNumSize( m_PinNumSize, m_PinNumSize ); int nameLineWidth = g_DrawDefaultLineThickness; int nameLineWidth = GetPenSize( ); nameLineWidth = Clamp_Text_PenSize( nameLineWidth, m_PinNameSize, false ); nameLineWidth = Clamp_Text_PenSize( nameLineWidth, m_PinNameSize, false ); int numLineWidth = g_DrawDefaultLineThickness; int numLineWidth = GetPenSize( ); numLineWidth = Clamp_Text_PenSize( numLineWidth, m_PinNumSize, false ); numLineWidth = Clamp_Text_PenSize( numLineWidth, m_PinNumSize, false ); GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode ); Loading eeschema/class_sch_cmp_field.cpp +20 −1 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,25 @@ SCH_CMP_FIELD::~SCH_CMP_FIELD() } } /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item */ int SCH_CMP_FIELD::GetPenSize( ) { int pensize = m_Width; if( pensize == 0 ) // Use default values for pen size { if( m_Bold ) pensize = GetPenSizeForBold( m_Size.x ); else pensize = g_DrawDefaultLineThickness; } // Clip pen size for small texts: pensize = Clamp_Text_PenSize( pensize, m_Size, m_Bold ); return pensize; } /** /** * Routine de trace des textes type Field du composant. * Routine de trace des textes type Field du composant. * entree: * entree: Loading Loading
eeschema/class_BodyItem_Text.cpp +19 −13 Original line number Original line Diff line number Diff line Loading @@ -189,26 +189,32 @@ LibDrawText* LibDrawText::GenCopy() } } void LibDrawText::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, /** Function GetPenSize const wxPoint& aOffset, int aColor, int aDrawMode, * @return the size of the "pen" that be used to draw or plot this item void* aData, const int aTransformMatrix[2][2] ) */ int LibDrawText::GetPenSize( ) { { wxPoint pos1, pos2; int pensize = m_Width; int color = ReturnLayerColor( LAYER_DEVICE ); int linewidth = m_Width; if( linewidth == 0 ) // Use default values for pen size if( pensize == 0 ) // Use default values for pen size { { if( m_Bold ) if( m_Bold ) linewidth = GetPenSizeForBold( m_Size.x ); pensize = GetPenSizeForBold( m_Size.x ); else else linewidth = g_DrawDefaultLineThickness; pensize = g_DrawDefaultLineThickness; } } // Clip pen size for small texts: // Clip pen size for small texts: linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold ); pensize = Clamp_Text_PenSize( pensize, m_Size, m_Bold ); return pensize; } void LibDrawText::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, const wxPoint& aOffset, int aColor, int aDrawMode, void* aData, const int aTransformMatrix[2][2] ) { wxPoint pos1, pos2; int color = ReturnLayerColor( LAYER_DEVICE ); if( aColor < 0 ) // Used normal color or selected color if( aColor < 0 ) // Used normal color or selected color { { if( ( m_Selected & IS_SELECTED ) ) if( ( m_Selected & IS_SELECTED ) ) Loading @@ -226,7 +232,7 @@ void LibDrawText::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, DrawGraphicText( aPanel, aDC, pos1, (EDA_Colors) color, m_Text, DrawGraphicText( aPanel, aDC, pos1, (EDA_Colors) color, m_Text, t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT, t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT, m_Size, m_HJustify, m_VJustify, m_Size, m_HJustify, m_VJustify, linewidth, m_Italic, m_Bold ); GetPenSize( ), m_Italic, m_Bold ); } } Loading
eeschema/class_libentry_fields.cpp +12 −1 Original line number Original line Diff line number Diff line Loading @@ -202,6 +202,17 @@ bool LibDrawField::Load( char* line, wxString& errorMsg ) } } /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item */ int LibDrawField::GetPenSize( ) { int pensize = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; return pensize; } /* /* * if aData not NULL, aData must point a wxString which is used instead of * if aData not NULL, aData must point a wxString which is used instead of * the m_Text * the m_Text Loading @@ -213,7 +224,7 @@ void LibDrawField::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, wxPoint text_pos; wxPoint text_pos; int color = aColor; int color = aColor; int linewidth = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; int linewidth = GetPenSize( ); linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold ); linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold ); Loading
eeschema/class_libentry_fields.h +5 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,11 @@ public: } } /** Function GetPenSize virtual pure * @return the size of the "pen" that be used to draw or plot this item */ int GetPenSize( ); /** /** * Function Save * Function Save * writes the data structures for this object out to a FILE in "*.brd" * writes the data structures for this object out to a FILE in "*.brd" Loading
eeschema/class_pin.cpp +13 −3 Original line number Original line Diff line number Diff line Loading @@ -276,6 +276,16 @@ bool LibDrawPin::Load( char* line, wxString& errorMsg ) } } /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item */ int LibDrawPin::GetPenSize( ) { int pensize = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; return pensize; } /**********************************************************************************************/ /**********************************************************************************************/ void LibDrawPin::Draw( WinEDA_DrawPanel* aPanel, void LibDrawPin::Draw( WinEDA_DrawPanel* aPanel, wxDC* aDC, wxDC* aDC, Loading Loading @@ -334,7 +344,7 @@ void LibDrawPin::DrawPinSymbol( WinEDA_DrawPanel* aPanel, { { int MapX1, MapY1, x1, y1; int MapX1, MapY1, x1, y1; int color; int color; int width = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width; int width = GetPenSize( ); int posX = aPinPos.x, posY = aPinPos.y, len = m_PinLen; int posX = aPinPos.x, posY = aPinPos.y, len = m_PinLen; BASE_SCREEN* screen = aPanel->GetScreen(); BASE_SCREEN* screen = aPanel->GetScreen(); Loading Loading @@ -510,10 +520,10 @@ void LibDrawPin::DrawPinTexts( WinEDA_DrawPanel* panel, wxSize PinNameSize( m_PinNameSize, m_PinNameSize ); wxSize PinNameSize( m_PinNameSize, m_PinNameSize ); wxSize PinNumSize( m_PinNumSize, m_PinNumSize ); wxSize PinNumSize( m_PinNumSize, m_PinNumSize ); int nameLineWidth = g_DrawDefaultLineThickness; int nameLineWidth = GetPenSize( ); nameLineWidth = Clamp_Text_PenSize( nameLineWidth, m_PinNameSize, false ); nameLineWidth = Clamp_Text_PenSize( nameLineWidth, m_PinNameSize, false ); int numLineWidth = g_DrawDefaultLineThickness; int numLineWidth = GetPenSize( ); numLineWidth = Clamp_Text_PenSize( numLineWidth, m_PinNumSize, false ); numLineWidth = Clamp_Text_PenSize( numLineWidth, m_PinNumSize, false ); GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode ); Loading
eeschema/class_sch_cmp_field.cpp +20 −1 Original line number Original line Diff line number Diff line Loading @@ -45,6 +45,25 @@ SCH_CMP_FIELD::~SCH_CMP_FIELD() } } /** Function GetPenSize * @return the size of the "pen" that be used to draw or plot this item */ int SCH_CMP_FIELD::GetPenSize( ) { int pensize = m_Width; if( pensize == 0 ) // Use default values for pen size { if( m_Bold ) pensize = GetPenSizeForBold( m_Size.x ); else pensize = g_DrawDefaultLineThickness; } // Clip pen size for small texts: pensize = Clamp_Text_PenSize( pensize, m_Size, m_Bold ); return pensize; } /** /** * Routine de trace des textes type Field du composant. * Routine de trace des textes type Field du composant. * entree: * entree: Loading