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
b8a449e0
Commit
b8a449e0
authored
Oct 12, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
smd pad in high-contrast mode enhancement
parent
2d4d4271
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
114 additions
and
59 deletions
+114
-59
change_log.txt
change_log.txt
+11
-0
gr_basic.h
include/gr_basic.h
+46
-46
class_pad.cpp
pcbnew/class_pad.cpp
+49
-5
class_track.cpp
pcbnew/class_track.cpp
+1
-1
cotation.cpp
pcbnew/cotation.cpp
+1
-1
onrightclick.cpp
pcbnew/onrightclick.cpp
+2
-2
tool_pcb.cpp
pcbnew/tool_pcb.cpp
+4
-4
No files found.
change_log.txt
View file @
b8a449e0
...
@@ -4,6 +4,17 @@ Started 2007-June-11
...
@@ -4,6 +4,17 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2007-Oct-11 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
+ pcbnew
* D_PAD::Draw() so that it shows SMD pads as greyed out when in high contrast
mode and not on current layer. Slight variation on this when laying down
tracks: m_Route_Layer_BOTTOM or m_Route_Layer_TOP layers' SMD pads are
not greyed out.
* Changed English UI text for "Cotation" to "Dimension".
2007-Oct-11 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
2007-Oct-11 UPDATE Geoff Harland <gharlandau@yahoo.com.au>
================================================================================
================================================================================
+ pcbnew
+ pcbnew
...
...
include/gr_basic.h
View file @
b8a449e0
...
@@ -14,10 +14,10 @@
...
@@ -14,10 +14,10 @@
/* Constantes utiles */
/* Constantes utiles */
#define GR_COPY 0
#define GR_COPY 0
#define GR_OR
0x
1000000
#define GR_OR
0x0
1000000
#define GR_XOR
0x
2000000
#define GR_XOR
0x0
2000000
#define GR_AND
0x
4000000
#define GR_AND
0x0
4000000
#define GR_NXOR
0x
8000000
#define GR_NXOR
0x0
8000000
#define GR_SURBRILL 0x80000000
#define GR_SURBRILL 0x80000000
...
...
pcbnew/class_pad.cpp
View file @
b8a449e0
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#include "common.h"
#include "common.h"
#include "pcbnew.h"
#include "pcbnew.h"
#include "trigo.h"
#include "trigo.h"
#include "id.h" // ID_TRACK_BUTT
#ifdef PCBNEW
#ifdef PCBNEW
#include "drag.h"
#include "drag.h"
...
@@ -238,11 +239,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -238,11 +239,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
wxPoint
coord
[
4
];
wxPoint
coord
[
4
];
int
zoom
;
int
zoom
;
int
fillpad
=
0
;
int
fillpad
=
0
;
PCB_SCREEN
*
screen
;
WinEDA_BasePcbFrame
*
frame
;
WinEDA_BasePcbFrame
*
frame
;
wxPoint
shape_pos
;
wxPoint
shape_pos
;
screen
=
panel
?
(
PCB_SCREEN
*
)
panel
->
m_Parent
->
m_CurrentScreen
:
(
PCB_SCREEN
*
)
ActiveScreen
;
PCB_SCREEN
*
screen
=
panel
?
(
PCB_SCREEN
*
)
panel
->
m_Parent
->
m_CurrentScreen
:
(
PCB_SCREEN
*
)
ActiveScreen
;
// @todo: if panel could have been NULL above, how can we dereference it here safely?
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
frame
=
(
WinEDA_BasePcbFrame
*
)
panel
->
m_Parent
;
/* Calcul de l'aspect du pad */
/* Calcul de l'aspect du pad */
...
@@ -255,8 +259,10 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -255,8 +259,10 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
if
(
m_Flags
&
IS_MOVED
)
if
(
m_Flags
&
IS_MOVED
)
fillpad
=
0
;
fillpad
=
0
;
#endif
#endif
if
(
m_Masque_Layer
&
CMP_LAYER
)
if
(
m_Masque_Layer
&
CMP_LAYER
)
color
=
g_PadCMPColor
;
color
=
g_PadCMPColor
;
if
(
m_Masque_Layer
&
CUIVRE_LAYER
)
if
(
m_Masque_Layer
&
CUIVRE_LAYER
)
color
|=
g_PadCUColor
;
color
|=
g_PadCUColor
;
...
@@ -322,6 +328,37 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -322,6 +328,37 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
}
}
}
//-----<test this>-----
// if SMD pad and high contrast mode
if
(
m_Attribut
==
SMD
&&
DisplayOpt
.
ContrastModeDisplay
)
{
// when editing tracks show SMD components on either of the routing
// layers as normal, not greyed out.
if
(
frame
->
m_ID_current_state
==
ID_TRACK_BUTT
)
{
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
&&
!
IsOnLayer
(
screen
->
m_Route_Layer_TOP
)
&&
!
IsOnLayer
(
screen
->
m_Route_Layer_BOTTOM
)
)
{
color
&=
~
MASKCOLOR
;
color
|=
DARKDARKGRAY
;
}
}
// when not edting tracks, show SMD components not on active layer as greyed out
else
{
if
(
!
IsOnLayer
(
screen
->
m_Active_Layer
)
)
{
color
&=
~
MASKCOLOR
;
color
|=
DARKDARKGRAY
;
}
}
}
//-----</test this>----
if
(
draw_mode
&
GR_SURBRILL
)
if
(
draw_mode
&
GR_SURBRILL
)
{
{
if
(
draw_mode
&
GR_AND
)
if
(
draw_mode
&
GR_AND
)
...
@@ -329,6 +366,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -329,6 +366,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
else
else
color
|=
HIGHT_LIGHT_FLAG
;
color
|=
HIGHT_LIGHT_FLAG
;
}
}
if
(
color
&
HIGHT_LIGHT_FLAG
)
if
(
color
&
HIGHT_LIGHT_FLAG
)
color
=
ColorRefs
[
color
&
MASKCOLOR
].
m_LightColor
;
color
=
ColorRefs
[
color
&
MASKCOLOR
].
m_LightColor
;
...
@@ -347,6 +385,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -347,6 +385,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
dy
=
dy0
=
m_Size
.
y
>>
1
;
/* demi dim dx et dy */
dy
=
dy0
=
m_Size
.
y
>>
1
;
/* demi dim dx et dy */
angle
=
m_Orient
;
angle
=
m_Orient
;
bool
DisplayIsol
=
DisplayOpt
.
DisplayPadIsol
;
bool
DisplayIsol
=
DisplayOpt
.
DisplayPadIsol
;
if
(
(
m_Masque_Layer
&
ALL_CU_LAYERS
)
==
0
)
if
(
(
m_Masque_Layer
&
ALL_CU_LAYERS
)
==
0
)
DisplayIsol
=
FALSE
;
DisplayIsol
=
FALSE
;
...
@@ -375,12 +414,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -375,12 +414,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
/* calcul de l'entraxe de l'ellipse */
/* calcul de l'entraxe de l'ellipse */
if
(
dx
>
dy
)
/* ellipse horizontale */
if
(
dx
>
dy
)
/* ellipse horizontale */
{
{
delta_cx
=
dx
-
dy
;
delta_cy
=
0
;
delta_cx
=
dx
-
dy
;
delta_cy
=
0
;
rotdx
=
m_Size
.
y
;
rotdx
=
m_Size
.
y
;
}
}
else
/* ellipse verticale */
else
/* ellipse verticale */
{
{
delta_cx
=
0
;
delta_cy
=
dy
-
dx
;
delta_cx
=
0
;
delta_cy
=
dy
-
dx
;
rotdx
=
m_Size
.
x
;
rotdx
=
m_Size
.
x
;
}
}
RotatePoint
(
&
delta_cx
,
&
delta_cy
,
angle
);
RotatePoint
(
&
delta_cx
,
&
delta_cy
,
angle
);
...
@@ -476,6 +517,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -476,6 +517,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
if
(
fillpad
&&
hole
)
if
(
fillpad
&&
hole
)
{
{
color
=
g_IsPrinting
?
WHITE
:
BLACK
;
// ou DARKGRAY;
color
=
g_IsPrinting
?
WHITE
:
BLACK
;
// ou DARKGRAY;
if
(
draw_mode
!=
GR_XOR
)
if
(
draw_mode
!=
GR_XOR
)
GRSetDrawMode
(
DC
,
GR_COPY
);
GRSetDrawMode
(
DC
,
GR_COPY
);
else
else
...
@@ -491,6 +533,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -491,6 +533,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
case
OVALE
:
case
OVALE
:
dx
=
m_Drill
.
x
>>
1
;
dx
=
m_Drill
.
x
>>
1
;
dy
=
m_Drill
.
y
>>
1
;
/* demi dim dx et dy */
dy
=
m_Drill
.
y
>>
1
;
/* demi dim dx et dy */
/* calcul de l'entraxe de l'ellipse */
/* calcul de l'entraxe de l'ellipse */
if
(
m_Drill
.
x
>
m_Drill
.
y
)
/* ellipse horizontale */
if
(
m_Drill
.
x
>
m_Drill
.
y
)
/* ellipse horizontale */
{
{
...
@@ -521,6 +564,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
...
@@ -521,6 +564,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
{
{
dx0
=
MIN
(
dx0
,
dy0
);
dx0
=
MIN
(
dx0
,
dy0
);
int
nc_color
=
BLUE
;
int
nc_color
=
BLUE
;
if
(
m_Masque_Layer
&
CMP_LAYER
)
/* Trace forme \ */
if
(
m_Masque_Layer
&
CMP_LAYER
)
/* Trace forme \ */
GRLine
(
&
panel
->
m_ClipBox
,
DC
,
cx0
-
dx0
,
cy0
-
dx0
,
GRLine
(
&
panel
->
m_ClipBox
,
DC
,
cx0
-
dx0
,
cy0
-
dx0
,
cx0
+
dx0
,
cy0
+
dx0
,
0
,
nc_color
);
cx0
+
dx0
,
cy0
+
dx0
,
0
,
nc_color
);
...
...
pcbnew/class_track.cpp
View file @
b8a449e0
...
@@ -561,7 +561,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
...
@@ -561,7 +561,7 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
int
rayon
;
int
rayon
;
int
curr_layer
=
(
(
PCB_SCREEN
*
)
panel
->
GetScreen
()
)
->
m_Active_Layer
;
int
curr_layer
=
(
(
PCB_SCREEN
*
)
panel
->
GetScreen
()
)
->
m_Active_Layer
;
if
(
Type
()
==
TYPEZONE
&&
(
!
DisplayOpt
.
DisplayZones
)
)
if
(
Type
()
==
TYPEZONE
&&
!
DisplayOpt
.
DisplayZones
)
return
;
return
;
GRSetDrawMode
(
DC
,
draw_mode
);
GRSetDrawMode
(
DC
,
draw_mode
);
...
...
pcbnew/cotation.cpp
View file @
b8a449e0
...
@@ -82,7 +82,7 @@ END_EVENT_TABLE()
...
@@ -82,7 +82,7 @@ END_EVENT_TABLE()
WinEDA_CotationPropertiesFrame
::
WinEDA_CotationPropertiesFrame
(
WinEDA_PcbFrame
*
parent
,
WinEDA_CotationPropertiesFrame
::
WinEDA_CotationPropertiesFrame
(
WinEDA_PcbFrame
*
parent
,
COTATION
*
Cotation
,
wxDC
*
DC
,
COTATION
*
Cotation
,
wxDC
*
DC
,
const
wxPoint
&
framepos
)
:
const
wxPoint
&
framepos
)
:
wxDialog
(
parent
,
-
1
,
_
(
"
Cotat
ion properties"
),
framepos
,
wxSize
(
340
,
270
),
wxDialog
(
parent
,
-
1
,
_
(
"
Dimens
ion properties"
),
framepos
,
wxSize
(
340
,
270
),
DIALOG_STYLE
)
DIALOG_STYLE
)
{
{
wxButton
*
Button
;
wxButton
*
Button
;
...
...
pcbnew/onrightclick.cpp
View file @
b8a449e0
...
@@ -317,10 +317,10 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
...
@@ -317,10 +317,10 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
if
(
!
flags
)
if
(
!
flags
)
{
{
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_EDIT_COTATION
,
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_EDIT_COTATION
,
_
(
"Edit
Cotat
ion"
),
edit_xpm
);
_
(
"Edit
Dimens
ion"
),
edit_xpm
);
}
}
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_DELETE_COTATION
,
ADD_MENUITEM
(
aPopMenu
,
ID_POPUP_PCB_DELETE_COTATION
,
_
(
"Delete
Cotat
ion"
),
delete_xpm
);
_
(
"Delete
Dimens
ion"
),
delete_xpm
);
break
;
break
;
case
TYPEMIRE
:
case
TYPEMIRE
:
...
...
pcbnew/tool_pcb.cpp
View file @
b8a449e0
...
@@ -422,11 +422,11 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
...
@@ -422,11 +422,11 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
m_VToolBar
->
AddTool
(
ID_TRACK_BUTT
,
wxEmptyString
,
m_VToolBar
->
AddTool
(
ID_TRACK_BUTT
,
wxEmptyString
,
BITMAP
(
add_tracks_xpm
),
BITMAP
(
add_tracks_xpm
),
_
(
"Add
Tracks an
vias"
),
wxITEM_CHECK
);
_
(
"Add
tracks and
vias"
),
wxITEM_CHECK
);
m_VToolBar
->
AddTool
(
ID_PCB_ZONES_BUTT
,
wxEmptyString
,
m_VToolBar
->
AddTool
(
ID_PCB_ZONES_BUTT
,
wxEmptyString
,
BITMAP
(
add_zone_xpm
),
BITMAP
(
add_zone_xpm
),
_
(
"Add
Z
ones"
),
wxITEM_CHECK
);
_
(
"Add
z
ones"
),
wxITEM_CHECK
);
m_VToolBar
->
AddSeparator
();
m_VToolBar
->
AddSeparator
();
m_VToolBar
->
AddTool
(
ID_LINE_COMMENT_BUTT
,
wxEmptyString
,
m_VToolBar
->
AddTool
(
ID_LINE_COMMENT_BUTT
,
wxEmptyString
,
...
@@ -443,12 +443,12 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
...
@@ -443,12 +443,12 @@ void WinEDA_PcbFrame::ReCreateVToolbar()
m_VToolBar
->
AddTool
(
ID_TEXT_COMMENT_BUTT
,
wxEmptyString
,
m_VToolBar
->
AddTool
(
ID_TEXT_COMMENT_BUTT
,
wxEmptyString
,
BITMAP
(
add_text_xpm
),
BITMAP
(
add_text_xpm
),
_
(
"Add
T
ext"
),
wxITEM_CHECK
);
_
(
"Add
t
ext"
),
wxITEM_CHECK
);
m_VToolBar
->
AddSeparator
();
m_VToolBar
->
AddSeparator
();
m_VToolBar
->
AddTool
(
ID_PCB_COTATION_BUTT
,
wxEmptyString
,
m_VToolBar
->
AddTool
(
ID_PCB_COTATION_BUTT
,
wxEmptyString
,
BITMAP
(
add_cotation_xpm
),
BITMAP
(
add_cotation_xpm
),
_
(
"Add
Cotat
ion"
),
wxITEM_CHECK
);
_
(
"Add
dimens
ion"
),
wxITEM_CHECK
);
m_VToolBar
->
AddTool
(
ID_PCB_MIRE_BUTT
,
wxEmptyString
,
m_VToolBar
->
AddTool
(
ID_PCB_MIRE_BUTT
,
wxEmptyString
,
BITMAP
(
add_mires_xpm
),
BITMAP
(
add_mires_xpm
),
...
...
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