Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
826237a1
Commit
826237a1
authored
May 29, 2009
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Marco's OSX BOARD::Draw() patch
parent
c7fc091a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
38 deletions
+46
-38
tracepcb.cpp
pcbnew/tracepcb.cpp
+46
-38
No files found.
pcbnew/tracepcb.cpp
View file @
826237a1
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment