Commit 756f191a authored by charras's avatar charras

Rework on TEXTE_PCB, SCH_TEXT and EDA_TextStruct classes.

Code seriously cleaned, obscure and duplicated code removed, and some oddities removed.
Better support of multiline texts.
parent aed1e5d4
...@@ -179,8 +179,11 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -179,8 +179,11 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
int DrawMode, const wxPoint& offset ) int DrawMode, const wxPoint& offset )
/**********************************************************************/ /**********************************************************************/
/* /** Function Draw
* DrawMode = GR_OR, GR_XOR.., -1 si mode courant. * DrawMode = GR_OR, GR_XOR ..
* Like tracks, texts are drawn in filled or sketch mode, never in line mode
* because the line mode does not keep the actual size of the text
* and the actual size is very important, especially for copper texts
*/ */
{ {
int color = g_DesignSettings.m_LayerColor[m_Layer]; int color = g_DesignSettings.m_LayerColor[m_Layer];
...@@ -188,15 +191,16 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -188,15 +191,16 @@ void TEXTE_PCB::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
if( color & ITEM_NOT_SHOW ) if( color & ITEM_NOT_SHOW )
return; return;
GRFillMode fillmode = FILLED;
if ( DisplayOpt.DisplayDrawItems == SKETCH)
GRFillMode fillmode = SKETCH;
EDA_TextStruct::Draw( EDA_TextStruct::Draw(
panel, panel, DC,
DC,
offset, offset,
(EDA_Colors) color, (EDA_Colors) color,
DrawMode, DrawMode, fillmode,
(GRFillMode) DisplayOpt.DisplayDrawItems, (g_AnchorColor & ITEM_NOT_SHOW) ? UNSPECIFIED_COLOR : (EDA_Colors) g_AnchorColor );
(g_AnchorColor &
ITEM_NOT_SHOW) ? UNSPECIFIED_COLOR : (EDA_Colors) g_AnchorColor );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment