Commit 826237a1 authored by dickelbeck's avatar dickelbeck

Marco's OSX BOARD::Draw() patch

parent c7fc091a
......@@ -101,33 +101,28 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
/********************************************************************/
/* Redraw the BOARD items but not cursors, axis or grid */
{
/* The order of drawing is flexible on some systems and not on others. For
* OSes which use OR to draw, the order is not important except for the
* effect of the highlight and its relationship to markers. See comment below.
* This order indepence comes from the fact that a binary OR operation is
* commutative in nature.
* However on the OSX, the OR operation is not used, and so this sequence
* below is chosen to give MODULEs the highest visible priority.
*/
for( MODULE* module = m_Modules; module; module = module->Next() )
{
bool display = true;
int layerMask = ALL_CU_LAYERS;
if( module->m_Flags & IS_MOVED )
continue;
if( !DisplayOpt.Show_Modules_Cmp )
/* Draw all tracks and zones. As long as dark colors are used for the tracks,
* Then the OR draw mode should show tracks underneath other tracks. But a white
* track will cover any other color since it has more bits to OR in.
*/
for( TRACK* track = m_Track; track; track = track->Next() )
{
if( module->GetLayer() == CMP_N )
display = FALSE;
layerMask &= ~CMP_LAYER;
track->Draw( aPanel, DC, aDrawMode );
}
if( !DisplayOpt.Show_Modules_Cu )
for( SEGZONE* zone = m_Zone; zone; zone = zone->Next() )
{
if( module->GetLayer() == COPPER_LAYER_N )
display = FALSE;
layerMask &= ~CUIVRE_LAYER;
}
if( display )
module->Draw( aPanel, DC, aDrawMode );
else
Trace_Pads_Only( aPanel, DC, module, 0, 0, layerMask, aDrawMode );
zone->Draw( aPanel, DC, aDrawMode );
}
// Draw the graphic items
......@@ -150,20 +145,6 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
}
}
/* Draw all tracks and zones. As long as dark colors are used for the tracks,
* Then the OR draw mode should show tracks underneath other tracks. But a white
* track will cover any other color since it has more bits to OR in.
*/
for( TRACK* track = m_Track; track; track = track->Next() )
{
track->Draw( aPanel, DC, aDrawMode );
}
for( SEGZONE* zone = m_Zone; zone; zone = zone->Next() )
{
zone->Draw( aPanel, DC, aDrawMode );
}
/* Draw areas (i.e. zones) */
for( int ii = 0; ii < GetAreaCount(); ii++ )
{
......@@ -178,6 +159,33 @@ void BOARD::Draw( WinEDA_DrawPanel* aPanel, wxDC* DC,
}
}
for( MODULE* module = m_Modules; module; module = module->Next() )
{
bool display = true;
int layerMask = ALL_CU_LAYERS;
if( module->m_Flags & IS_MOVED )
continue;
if( !DisplayOpt.Show_Modules_Cmp )
{
if( module->GetLayer() == CMP_N )
display = FALSE;
layerMask &= ~CMP_LAYER;
}
if( !DisplayOpt.Show_Modules_Cu )
{
if( module->GetLayer() == COPPER_LAYER_N )
display = FALSE;
layerMask &= ~CUIVRE_LAYER;
}
if( display )
module->Draw( aPanel, DC, aDrawMode );
else
Trace_Pads_Only( aPanel, DC, module, 0, 0, layerMask, aDrawMode );
}
// @todo: this high-light functionality could be built into me.
if( g_HightLigt_Status )
......
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