code cleanup
This commit is contained in:
parent
b13267f496
commit
497cb9f7d0
|
@ -442,6 +442,11 @@ void GRLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int wi
|
|||
width ), Color );
|
||||
}
|
||||
|
||||
void GRLine(EDA_Rect * aClipBox, wxDC * aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor)
|
||||
{
|
||||
GRSLine( aClipBox, aDC, GRMapX( aStart.x ), GRMapY( aStart.y ), GRMapX( aEnd.x ), GRMapY( aEnd.y ),
|
||||
ZoomValue( aWidth ), aColor );
|
||||
}
|
||||
|
||||
/***************************************************/
|
||||
/* Routine to draw a Dashed line, in Screen space. */
|
||||
|
|
|
@ -70,6 +70,7 @@ void GRForceBlackPen(bool flagforce );
|
|||
bool GetGRForceBlackPenState( void );
|
||||
void SetPenMinWidth(int minwidth); /* ajustage de la largeur mini de plume */
|
||||
|
||||
void GRLine(EDA_Rect * aClipBox, wxDC * aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor);
|
||||
void GRLine(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1, int x2, int y2, int width, int Color);
|
||||
void GRMixedLine(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1, int x2, int y2, int width, int Color);
|
||||
void GRSMixedLine(EDA_Rect * ClipBox, wxDC * DC, int x1, int y1, int x2, int y2, int width, int Color);
|
||||
|
|
|
@ -179,10 +179,7 @@ void NETINFO_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const
|
|||
*/
|
||||
void RATSNEST_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const wxPoint& aOffset )
|
||||
{
|
||||
GRLine( &panel->m_ClipBox, DC, m_PadStart->m_Pos.x + aOffset.x,
|
||||
m_PadStart->m_Pos.y + aOffset.y,
|
||||
m_PadEnd->m_Pos.x + aOffset.x,
|
||||
m_PadEnd->m_Pos.y + aOffset.y,
|
||||
0, g_DesignSettings.m_RatsnestColor );
|
||||
GRLine( &panel->m_ClipBox, DC, m_PadStart->m_Pos - aOffset,
|
||||
m_PadEnd->m_Pos - aOffset, 0, g_DesignSettings.m_RatsnestColor );
|
||||
}
|
||||
|
||||
|
|
|
@ -767,7 +767,7 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
|
|||
int WinEDA_BasePcbFrame::Test_1_Net_Ratsnest( wxDC* DC, int ref_netcode )
|
||||
/**************************************************************************/
|
||||
|
||||
/**
|
||||
/** function Test_1_Net_Ratsnest
|
||||
* Compute the rastnest relative to the net "net_code"
|
||||
* @param ref_netcode = netcode used to compute the rastnest.
|
||||
*/
|
||||
|
@ -1043,23 +1043,20 @@ void WinEDA_BasePcbFrame::trace_ratsnest_module( wxDC* DC )
|
|||
|
||||
GRSetDrawMode( DC, GR_XOR );
|
||||
int tmpcolor = g_DesignSettings.m_RatsnestColor;
|
||||
wxPoint offset = -g_Offset_Module;
|
||||
while( ii-- > 0 )
|
||||
{
|
||||
if( local_chevelu->m_Status & LOCAL_RATSNEST_ITEM )
|
||||
{
|
||||
g_DesignSettings.m_RatsnestColor = YELLOW;
|
||||
local_chevelu->Draw( DrawPanel, DC, GR_XOR, offset );
|
||||
local_chevelu->Draw( DrawPanel, DC, GR_XOR, g_Offset_Module );
|
||||
}
|
||||
else
|
||||
{
|
||||
g_DesignSettings.m_RatsnestColor = tmpcolor;
|
||||
GRLine( &DrawPanel->m_ClipBox, DC,
|
||||
local_chevelu->m_PadStart->m_Pos.x + offset.x,
|
||||
local_chevelu->m_PadStart->m_Pos.y + offset.y,
|
||||
local_chevelu->m_PadEnd->m_Pos.x,
|
||||
local_chevelu->m_PadEnd->m_Pos.y,
|
||||
0, g_DesignSettings.m_RatsnestColor );
|
||||
wxPoint tmp = local_chevelu->m_PadStart->m_Pos;
|
||||
local_chevelu->m_PadStart->m_Pos -= g_Offset_Module;
|
||||
local_chevelu->Draw( DrawPanel, DC, GR_XOR, wxPoint(0,0) );
|
||||
local_chevelu->m_PadStart->m_Pos = tmp;
|
||||
}
|
||||
local_chevelu++;
|
||||
}
|
||||
|
@ -1193,8 +1190,6 @@ void WinEDA_BasePcbFrame::trace_ratsnest_pad( wxDC* DC )
|
|||
if( ii >= g_MaxLinksShowed )
|
||||
break;
|
||||
|
||||
GRLine( &DrawPanel->m_ClipBox, DC, s_CursorPos.x, s_CursorPos.y,
|
||||
s_RatsnestMouseToPads[ii].x, s_RatsnestMouseToPads[ii].y,
|
||||
0, YELLOW );
|
||||
GRLine( &DrawPanel->m_ClipBox, DC, s_CursorPos, s_RatsnestMouseToPads[ii], 0, YELLOW );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue