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
497cb9f7
Commit
497cb9f7
authored
May 25, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup
parent
b13267f4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
21 deletions
+19
-21
gr_basic.cpp
common/gr_basic.cpp
+5
-0
gr_basic.h
include/gr_basic.h
+1
-0
class_netinfo_item.cpp
pcbnew/class_netinfo_item.cpp
+3
-6
ratsnest.cpp
pcbnew/ratsnest.cpp
+10
-15
No files found.
common/gr_basic.cpp
View file @
497cb9f7
...
@@ -442,6 +442,11 @@ void GRLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int wi
...
@@ -442,6 +442,11 @@ void GRLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int wi
width
),
Color
);
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. */
/* Routine to draw a Dashed line, in Screen space. */
...
...
include/gr_basic.h
View file @
497cb9f7
...
@@ -70,6 +70,7 @@ void GRForceBlackPen(bool flagforce );
...
@@ -70,6 +70,7 @@ void GRForceBlackPen(bool flagforce );
bool
GetGRForceBlackPenState
(
void
);
bool
GetGRForceBlackPenState
(
void
);
void
SetPenMinWidth
(
int
minwidth
);
/* ajustage de la largeur mini de plume */
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
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
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
);
void
GRSMixedLine
(
EDA_Rect
*
ClipBox
,
wxDC
*
DC
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
width
,
int
Color
);
...
...
pcbnew/class_netinfo_item.cpp
View file @
497cb9f7
...
@@ -179,10 +179,7 @@ void NETINFO_ITEM::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int aDrawMode, const
...
@@ -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
)
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
,
GRLine
(
&
panel
->
m_ClipBox
,
DC
,
m_PadStart
->
m_Pos
-
aOffset
,
m_PadStart
->
m_Pos
.
y
+
aOffset
.
y
,
m_PadEnd
->
m_Pos
-
aOffset
,
0
,
g_DesignSettings
.
m_RatsnestColor
);
m_PadEnd
->
m_Pos
.
x
+
aOffset
.
x
,
m_PadEnd
->
m_Pos
.
y
+
aOffset
.
y
,
0
,
g_DesignSettings
.
m_RatsnestColor
);
}
}
pcbnew/ratsnest.cpp
View file @
497cb9f7
...
@@ -767,7 +767,7 @@ void WinEDA_BasePcbFrame::Tst_Ratsnest( wxDC* DC, int ref_netcode )
...
@@ -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
)
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"
* Compute the rastnest relative to the net "net_code"
* @param ref_netcode = netcode used to compute the rastnest.
* @param ref_netcode = netcode used to compute the rastnest.
*/
*/
...
@@ -1043,23 +1043,20 @@ void WinEDA_BasePcbFrame::trace_ratsnest_module( wxDC* DC )
...
@@ -1043,23 +1043,20 @@ void WinEDA_BasePcbFrame::trace_ratsnest_module( wxDC* DC )
GRSetDrawMode
(
DC
,
GR_XOR
);
GRSetDrawMode
(
DC
,
GR_XOR
);
int
tmpcolor
=
g_DesignSettings
.
m_RatsnestColor
;
int
tmpcolor
=
g_DesignSettings
.
m_RatsnestColor
;
wxPoint
offset
=
-
g_Offset_Module
;
while
(
ii
--
>
0
)
while
(
ii
--
>
0
)
{
{
if
(
local_chevelu
->
m_Status
&
LOCAL_RATSNEST_ITEM
)
if
(
local_chevelu
->
m_Status
&
LOCAL_RATSNEST_ITEM
)
{
{
g_DesignSettings
.
m_RatsnestColor
=
YELLOW
;
g_DesignSettings
.
m_RatsnestColor
=
YELLOW
;
local_chevelu
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
,
offset
);
local_chevelu
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
,
g_Offset_Module
);
}
}
else
else
{
{
g_DesignSettings
.
m_RatsnestColor
=
tmpcolor
;
g_DesignSettings
.
m_RatsnestColor
=
tmpcolor
;
GRLine
(
&
DrawPanel
->
m_ClipBox
,
DC
,
wxPoint
tmp
=
local_chevelu
->
m_PadStart
->
m_Pos
;
local_chevelu
->
m_PadStart
->
m_Pos
.
x
+
offset
.
x
,
local_chevelu
->
m_PadStart
->
m_Pos
-=
g_Offset_Module
;
local_chevelu
->
m_PadStart
->
m_Pos
.
y
+
offset
.
y
,
local_chevelu
->
Draw
(
DrawPanel
,
DC
,
GR_XOR
,
wxPoint
(
0
,
0
)
);
local_chevelu
->
m_PadEnd
->
m_Pos
.
x
,
local_chevelu
->
m_PadStart
->
m_Pos
=
tmp
;
local_chevelu
->
m_PadEnd
->
m_Pos
.
y
,
0
,
g_DesignSettings
.
m_RatsnestColor
);
}
}
local_chevelu
++
;
local_chevelu
++
;
}
}
...
@@ -1193,8 +1190,6 @@ void WinEDA_BasePcbFrame::trace_ratsnest_pad( wxDC* DC )
...
@@ -1193,8 +1190,6 @@ void WinEDA_BasePcbFrame::trace_ratsnest_pad( wxDC* DC )
if
(
ii
>=
g_MaxLinksShowed
)
if
(
ii
>=
g_MaxLinksShowed
)
break
;
break
;
GRLine
(
&
DrawPanel
->
m_ClipBox
,
DC
,
s_CursorPos
.
x
,
s_CursorPos
.
y
,
GRLine
(
&
DrawPanel
->
m_ClipBox
,
DC
,
s_CursorPos
,
s_RatsnestMouseToPads
[
ii
],
0
,
YELLOW
);
s_RatsnestMouseToPads
[
ii
].
x
,
s_RatsnestMouseToPads
[
ii
].
y
,
0
,
YELLOW
);
}
}
}
}
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