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
0f406d3f
Commit
0f406d3f
authored
Aug 15, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MaskLay was type bool, needs to be type int
parent
2b6ec786
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
152 additions
and
133 deletions
+152
-133
tracepcb.cpp
pcbnew/tracepcb.cpp
+152
-133
No files found.
pcbnew/tracepcb.cpp
View file @
0f406d3f
/*****************************************/
/* Routines generales d'affichage du PCB */
/*****************************************/
/*****************************************/
/* Routines generales d'affichage du PCB */
/*****************************************/
/* fichier tracepcb.cpp */
/* fichier tracepcb.cpp */
/*
Routines d'affichage grille, Boite de coordonnees, Curseurs, marqueurs ...
*/
*
Routines d'affichage grille, Boite de coordonnees, Curseurs, marqueurs ...
*/
#include "fctsys.h"
#include "gr_basic.h"
...
...
@@ -23,170 +24,188 @@
/**********************************************************************/
void
WinEDA_ModuleEditFrame
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
void
WinEDA_ModuleEditFrame
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
/**********************************************************************/
/* Trace le PCB, et les elements complementaires ( axes, grille .. )
pour l'ecran actif et ses sous ecran
*/
*
pour l'ecran actif et ses sous ecran
*/
{
MODULE
*
Module
;
PCB_SCREEN
*
screen
=
GetScreen
();
if
(
!
m_Pcb
||
!
screen
)
return
;
MODULE
*
Module
;
PCB_SCREEN
*
screen
=
GetScreen
();
ActiveScreen
=
screen
;
GRSetDrawMode
(
DC
,
GR_COPY
)
;
if
(
!
m_Pcb
||
!
screen
)
return
;
if
(
EraseBg
)
DrawPanel
->
EraseScreen
(
DC
);
ActiveScreen
=
screen
;
GRSetDrawMode
(
DC
,
GR_COPY
);
DrawPanel
->
DrawBackGround
(
DC
);
TraceWorkSheet
(
DC
,
screen
,
0
);
if
(
EraseBg
)
DrawPanel
->
EraseScreen
(
DC
);
Module
=
(
MODULE
*
)
m_Pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Pnext
)
{
Module
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_OR
);
}
DrawPanel
->
DrawBackGround
(
DC
);
TraceWorkSheet
(
DC
,
screen
,
0
);
Module
=
(
MODULE
*
)
m_Pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Pnext
)
{
Module
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_OR
);
}
Affiche_Status_Box
();
Affiche_Status_Box
();
if
(
DrawPanel
->
ManageCurseur
)
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
if
(
DrawPanel
->
ManageCurseur
)
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
/* Reaffichage du curseur */
DrawPanel
->
Trace_Curseur
(
DC
);
/* Reaffichage du curseur */
DrawPanel
->
Trace_Curseur
(
DC
);
screen
->
ClrRefreshReq
();
screen
->
ClrRefreshReq
();
}
/****************************************************************/
void
WinEDA_PcbFrame
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
void
WinEDA_PcbFrame
::
RedrawActiveWindow
(
wxDC
*
DC
,
bool
EraseBg
)
/****************************************************************/
/* Trace le PCB, et les elements complementaires ( axes, grille .. )
pour l'ecran actif et ses sous ecran
*/
*
pour l'ecran actif et ses sous ecran
*/
{
PCB_SCREEN
*
Screen
=
GetScreen
();
PCB_SCREEN
*
Screen
=
GetScreen
();
if
(
!
m_Pcb
||
!
Screen
)
return
;
if
(
!
m_Pcb
||
!
Screen
)
return
;
ActiveScreen
=
GetScreen
();
GRSetDrawMode
(
DC
,
GR_COPY
);
ActiveScreen
=
GetScreen
();
GRSetDrawMode
(
DC
,
GR_COPY
);
if
(
EraseBg
)
DrawPanel
->
EraseScreen
(
DC
);
if
(
EraseBg
)
DrawPanel
->
EraseScreen
(
DC
);
DrawPanel
->
DrawBackGround
(
DC
);
DrawPanel
->
DrawBackGround
(
DC
);
Trace_Pcb
(
DC
,
GR_OR
);
TraceWorkSheet
(
DC
,
GetScreen
(),
0
);
Affiche_Status_Box
();
Trace_Pcb
(
DC
,
GR_OR
);
TraceWorkSheet
(
DC
,
GetScreen
(),
0
);
Affiche_Status_Box
();
/* Reaffichage des curseurs */
for
(
Screen
=
GetScreen
();
Screen
!=
NULL
;
Screen
=
Screen
->
Next
()
)
{
if
(
DrawPanel
->
ManageCurseur
)
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
DrawPanel
->
Trace_Curseur
(
DC
);
}
/* Reaffichage des curseurs */
for
(
Screen
=
GetScreen
();
Screen
!=
NULL
;
Screen
=
Screen
->
Next
()
)
{
if
(
DrawPanel
->
ManageCurseur
)
DrawPanel
->
ManageCurseur
(
DrawPanel
,
DC
,
FALSE
);
DrawPanel
->
Trace_Curseur
(
DC
);
}
}
/****************************************************/
void
WinEDA_PcbFrame
::
Trace_Pcb
(
wxDC
*
DC
,
int
mode
)
void
WinEDA_PcbFrame
::
Trace_Pcb
(
wxDC
*
DC
,
int
mode
)
/****************************************************/
/* Trace l'ensemble des elements du PCB sur l'ecran actif*/
{
MARQUEUR
*
Marqueur
;
MODULE
*
Module
;
EDA_BaseStruct
*
PtStruct
;
if
(
!
m_Pcb
)
return
;
Module
=
(
MODULE
*
)
m_Pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Pnext
)
{
bool
display
=
TRUE
,
MaskLay
=
ALL_CU_LAYERS
;
if
(
Module
->
m_Flags
&
IS_MOVED
)
continue
;
if
(
!
DisplayOpt
.
Show_Modules_Cmp
)
{
if
(
Module
->
m_Layer
==
CMP_N
)
display
=
FALSE
;
MaskLay
&=
~
CMP_LAYER
;
}
if
(
!
DisplayOpt
.
Show_Modules_Cu
)
{
if
(
Module
->
m_Layer
==
CUIVRE_N
)
display
=
FALSE
;
MaskLay
&=
~
CUIVRE_LAYER
;
}
if
(
display
)
Module
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
else
Trace_Pads_Only
(
DrawPanel
,
DC
,
Module
,
0
,
0
,
MaskLay
,
mode
);
}
/* Trace des elements particuliers de Drawings Pcb */
PtStruct
=
m_Pcb
->
m_Drawings
;
for
(
;
PtStruct
!=
NULL
;
PtStruct
=
PtStruct
->
Pnext
)
{
if
(
PtStruct
->
m_Flags
&
IS_MOVED
)
continue
;
switch
(
PtStruct
->
m_StructType
)
{
case
TYPECOTATION
:
((
COTATION
*
)
PtStruct
)
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
break
;
case
TYPETEXTE
:
((
TEXTE_PCB
*
)
PtStruct
)
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
break
;
case
TYPEMIRE
:
((
MIREPCB
*
)
PtStruct
)
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
break
;
case
TYPEMARQUEUR
:
/* Trace des marqueurs */
Marqueur
=
(
MARQUEUR
*
)
PtStruct
;
Marqueur
->
Draw
(
DrawPanel
,
DC
,
mode
);
break
;
default
:
break
;
}
}
Trace_Pistes
(
DrawPanel
,
m_Pcb
,
DC
,
mode
);
if
(
g_HightLigt_Status
)
DrawHightLight
(
DC
,
g_HightLigth_NetCode
)
;
EDGE_ZONE
*
segment
=
m_Pcb
->
m_CurrentLimitZone
;
for
(
;
segment
!=
NULL
;
segment
=
(
EDGE_ZONE
*
)
segment
->
Pback
)
{
if
(
segment
->
m_Flags
&
IS_MOVED
)
continue
;
Trace_DrawSegmentPcb
(
DrawPanel
,
DC
,
segment
,
mode
);
}
Trace_PcbEdges
(
DC
,
mode
);
DrawGeneralRatsnest
(
DC
);
m_CurrentScreen
->
ClrRefreshReq
();
MARQUEUR
*
Marqueur
;
MODULE
*
Module
;
EDA_BaseStruct
*
PtStruct
;
if
(
!
m_Pcb
)
return
;
Module
=
(
MODULE
*
)
m_Pcb
->
m_Modules
;
for
(
;
Module
!=
NULL
;
Module
=
(
MODULE
*
)
Module
->
Pnext
)
{
bool
display
=
true
;
int
MaskLay
=
ALL_CU_LAYERS
;
if
(
Module
->
m_Flags
&
IS_MOVED
)
continue
;
if
(
!
DisplayOpt
.
Show_Modules_Cmp
)
{
if
(
Module
->
m_Layer
==
CMP_N
)
display
=
FALSE
;
MaskLay
&=
~
CMP_LAYER
;
}
if
(
!
DisplayOpt
.
Show_Modules_Cu
)
{
if
(
Module
->
m_Layer
==
CUIVRE_N
)
display
=
FALSE
;
MaskLay
&=
~
CUIVRE_LAYER
;
}
if
(
display
)
Module
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
else
Trace_Pads_Only
(
DrawPanel
,
DC
,
Module
,
0
,
0
,
MaskLay
,
mode
);
}
/* Trace des elements particuliers de Drawings Pcb */
PtStruct
=
m_Pcb
->
m_Drawings
;
for
(
;
PtStruct
!=
NULL
;
PtStruct
=
PtStruct
->
Pnext
)
{
if
(
PtStruct
->
m_Flags
&
IS_MOVED
)
continue
;
switch
(
PtStruct
->
m_StructType
)
{
case
TYPECOTATION
:
(
(
COTATION
*
)
PtStruct
)
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
break
;
case
TYPETEXTE
:
(
(
TEXTE_PCB
*
)
PtStruct
)
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
break
;
case
TYPEMIRE
:
(
(
MIREPCB
*
)
PtStruct
)
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
mode
);
break
;
case
TYPEMARQUEUR
:
/* Trace des marqueurs */
Marqueur
=
(
MARQUEUR
*
)
PtStruct
;
Marqueur
->
Draw
(
DrawPanel
,
DC
,
mode
);
break
;
default
:
break
;
}
}
Trace_Pistes
(
DrawPanel
,
m_Pcb
,
DC
,
mode
);
if
(
g_HightLigt_Status
)
DrawHightLight
(
DC
,
g_HightLigth_NetCode
);
EDGE_ZONE
*
segment
=
m_Pcb
->
m_CurrentLimitZone
;
for
(
;
segment
!=
NULL
;
segment
=
(
EDGE_ZONE
*
)
segment
->
Pback
)
{
if
(
segment
->
m_Flags
&
IS_MOVED
)
continue
;
Trace_DrawSegmentPcb
(
DrawPanel
,
DC
,
segment
,
mode
);
}
Trace_PcbEdges
(
DC
,
mode
);
DrawGeneralRatsnest
(
DC
);
m_CurrentScreen
->
ClrRefreshReq
();
}
/**************************************************************/
void
WinEDA_PcbFrame
::
Trace_PcbEdges
(
wxDC
*
DC
,
int
mode_color
)
void
WinEDA_PcbFrame
::
Trace_PcbEdges
(
wxDC
*
DC
,
int
mode_color
)
/**************************************************************/
/* impression des contours ( edge pcb) : et draw */
{
EDA_BaseStruct
*
PtStruct
;
if
(
!
m_Pcb
)
return
;
for
(
PtStruct
=
m_Pcb
->
m_Drawings
;
PtStruct
!=
NULL
;
PtStruct
=
PtStruct
->
Pnext
)
{
if
(
PtStruct
->
m_Flags
&
IS_MOVED
)
continue
;
if
(
PtStruct
->
m_StructType
!=
TYPEDRAWSEGMENT
)
continue
;
Trace_DrawSegmentPcb
(
DrawPanel
,
DC
,
(
DRAWSEGMENT
*
)
PtStruct
,
mode_color
);
}
EDA_BaseStruct
*
PtStruct
;
if
(
!
m_Pcb
)
return
;
for
(
PtStruct
=
m_Pcb
->
m_Drawings
;
PtStruct
!=
NULL
;
PtStruct
=
PtStruct
->
Pnext
)
{
if
(
PtStruct
->
m_Flags
&
IS_MOVED
)
continue
;
if
(
PtStruct
->
m_StructType
!=
TYPEDRAWSEGMENT
)
continue
;
Trace_DrawSegmentPcb
(
DrawPanel
,
DC
,
(
DRAWSEGMENT
*
)
PtStruct
,
mode_color
);
}
}
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