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
460dcfc6
Commit
460dcfc6
authored
Oct 02, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed SELECTION layer.
parent
24af7490
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
48 additions
and
148 deletions
+48
-148
layers_id_colors_and_visibility.h
include/layers_id_colors_and_visibility.h
+0
-1
basepcbframe.cpp
pcbnew/basepcbframe.cpp
+1
-2
class_dimension.cpp
pcbnew/class_dimension.cpp
+0
-12
class_dimension.h
pcbnew/class_dimension.h
+0
-3
class_module.cpp
pcbnew/class_module.cpp
+0
-7
class_module.h
pcbnew/class_module.h
+0
-3
class_pcb_text.cpp
pcbnew/class_pcb_text.cpp
+0
-11
class_pcb_text.h
pcbnew/class_pcb_text.h
+0
-3
class_text_mod.cpp
pcbnew/class_text_mod.cpp
+1
-4
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+43
-95
pcb_painter.h
pcbnew/pcb_painter.h
+0
-4
pcbframe.cpp
pcbnew/pcbframe.cpp
+2
-2
bright_box.h
pcbnew/tools/bright_box.h
+1
-1
No files found.
include/layers_id_colors_and_visibility.h
View file @
460dcfc6
...
...
@@ -261,7 +261,6 @@ enum PCB_VISIBLE
PAD_BK_NETNAMES_VISIBLE
,
PADS_NETNAMES_VISIBLE
,
SELECTION
,
WORKSHEET
,
GP_OVERLAY
,
// General purpose overlay
...
...
pcbnew/basepcbframe.cpp
View file @
460dcfc6
...
...
@@ -72,7 +72,7 @@ static const wxString FastGrid2Entry( wxT( "FastGrid2" ) );
const
LAYER_NUM
PCB_BASE_FRAME
::
GAL_LAYER_ORDER
[]
=
{
ITEM_GAL_LAYER
(
GP_OVERLAY
),
ITEM_GAL_LAYER
(
SELECTION
),
ITEM_GAL_LAYER
(
GP_OVERLAY
),
ITEM_GAL_LAYER
(
PADS_NETNAMES_VISIBLE
),
DRAW_N
,
COMMENT_N
,
ECO1_N
,
ECO2_N
,
EDGE_N
,
UNUSED_LAYER_29
,
UNUSED_LAYER_30
,
UNUSED_LAYER_31
,
...
...
@@ -895,7 +895,6 @@ void PCB_BASE_FRAME::LoadSettings()
view
->
SetRequired
(
SOLDERPASTE_N_BACK
,
ITEM_GAL_LAYER
(
PAD_BK_VISIBLE
)
);
view
->
SetRequired
(
SOLDERMASK_N_BACK
,
ITEM_GAL_LAYER
(
PAD_BK_VISIBLE
)
);
view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
SELECTION
),
KiGfx
::
TARGET_OVERLAY
);
view
->
SetLayerTarget
(
ITEM_GAL_LAYER
(
GP_OVERLAY
),
KiGfx
::
TARGET_OVERLAY
);
// Apply layer coloring scheme & display options
...
...
pcbnew/class_dimension.cpp
View file @
460dcfc6
...
...
@@ -508,18 +508,6 @@ const BOX2I DIMENSION::ViewBBox() const
}
void
DIMENSION
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
// Layer that simply displays the text
aLayers
[
0
]
=
m_Layer
;
// On the general purpose overlay there is a selection box displayed
aLayers
[
1
]
=
ITEM_GAL_LAYER
(
SELECTION
);
aCount
=
2
;
}
EDA_ITEM
*
DIMENSION
::
Clone
()
const
{
return
new
DIMENSION
(
*
this
);
...
...
pcbnew/class_dimension.h
View file @
460dcfc6
...
...
@@ -147,9 +147,6 @@ public:
/// @copydoc VIEW_ITEM::ViewBBox()
virtual
const
BOX2I
ViewBBox
()
const
;
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
#if defined(DEBUG)
virtual
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
const
{
ShowDummy
(
os
);
}
// override
#endif
...
...
pcbnew/class_module.cpp
View file @
460dcfc6
...
...
@@ -1024,10 +1024,3 @@ void MODULE::SetOrientation( double newangle )
CalculateBoundingBox
();
}
void
MODULE
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
aCount
=
2
;
aLayers
[
0
]
=
ITEM_GAL_LAYER
(
SELECTION
);
// Selection box
aLayers
[
1
]
=
m_Layer
;
}
pcbnew/class_module.h
View file @
460dcfc6
...
...
@@ -499,9 +499,6 @@ public:
/// Return the initial comments block or NULL if none, without transfer of ownership.
const
wxArrayString
*
GetInitialComments
()
const
{
return
m_initial_comments
;
}
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
#if defined(DEBUG)
virtual
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
const
{
ShowDummy
(
os
);
}
// override
#endif
...
...
pcbnew/class_pcb_text.cpp
View file @
460dcfc6
...
...
@@ -224,14 +224,3 @@ const BOX2I TEXTE_PCB::ViewBBox() const
}
}
void
TEXTE_PCB
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
// Layer that simply displays the text
aLayers
[
0
]
=
m_Layer
;
// On the general purpose overlay there is a selection box displayed
aLayers
[
1
]
=
ITEM_GAL_LAYER
(
SELECTION
);
aCount
=
2
;
}
pcbnew/class_pcb_text.h
View file @
460dcfc6
...
...
@@ -134,9 +134,6 @@ public:
/// @copydoc VIEW_ITEM::ViewBBox()
virtual
const
BOX2I
ViewBBox
()
const
;
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
#if defined(DEBUG)
virtual
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
const
{
ShowDummy
(
os
);
}
// override
#endif
...
...
pcbnew/class_text_mod.cpp
View file @
460dcfc6
...
...
@@ -472,8 +472,5 @@ void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const
break
;
}
// On the general purpose overlay there is a selection box displayed
aLayers
[
1
]
=
ITEM_GAL_LAYER
(
SELECTION
);
aCount
=
2
;
aCount
=
1
;
}
pcbnew/pcb_painter.cpp
View file @
460dcfc6
...
...
@@ -76,7 +76,6 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings
m_layerColors
[
ITEM_GAL_LAYER
(
PAD_FR_NETNAMES_VISIBLE
)]
=
COLOR4D
(
0.8
,
0.8
,
0.8
,
0.7
);
m_layerColors
[
ITEM_GAL_LAYER
(
PAD_BK_NETNAMES_VISIBLE
)]
=
COLOR4D
(
0.8
,
0.8
,
0.8
,
0.7
);
m_layerColors
[
ITEM_GAL_LAYER
(
WORKSHEET
)]
=
COLOR4D
(
0.5
,
0.0
,
0.0
,
1.0
);
m_layerColors
[
ITEM_GAL_LAYER
(
SELECTION
)]
=
COLOR4D
(
1.0
,
1.0
,
1.0
,
0.5
);
// Netnames for copper layers
for
(
LAYER_NUM
layer
=
FIRST_COPPER_LAYER
;
layer
<=
LAST_COPPER_LAYER
;
++
layer
)
...
...
@@ -227,10 +226,6 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
draw
(
(
DRAWSEGMENT
*
)
aItem
);
break
;
case
PCB_MODULE_T
:
draw
(
(
MODULE
*
)
aItem
,
aLayer
);
break
;
case
PCB_TEXT_T
:
draw
(
(
TEXTE_PCB
*
)
aItem
,
aLayer
);
break
;
...
...
@@ -699,26 +694,8 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment )
}
void
PCB_PAINTER
::
draw
(
const
MODULE
*
aModule
,
int
aLayer
)
{
// For modules we have to draw a selection box if needed
if
(
aLayer
==
ITEM_GAL_LAYER
(
SELECTION
)
)
{
if
(
aModule
->
IsSelected
()
)
drawSelectionBox
(
aModule
);
}
}
void
PCB_PAINTER
::
draw
(
const
TEXTE_PCB
*
aText
,
int
aLayer
)
{
if
(
aLayer
==
ITEM_GAL_LAYER
(
SELECTION
)
)
{
if
(
aText
->
IsSelected
()
)
drawSelectionBox
(
aText
);
}
else
{
if
(
aText
->
GetText
().
Length
()
==
0
)
return
;
...
...
@@ -730,19 +707,11 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer )
m_gal
->
SetLineWidth
(
aText
->
GetThickness
()
);
m_gal
->
SetTextAttributes
(
aText
);
m_gal
->
StrokeText
(
std
::
string
(
aText
->
GetText
().
mb_str
()
),
position
,
orientation
);
}
}
void
PCB_PAINTER
::
draw
(
const
TEXTE_MODULE
*
aText
,
int
aLayer
)
{
if
(
aLayer
==
ITEM_GAL_LAYER
(
SELECTION
)
)
{
if
(
aText
->
IsSelected
()
)
drawSelectionBox
(
aText
);
}
else
{
if
(
aText
->
GetLength
()
==
0
)
return
;
...
...
@@ -754,8 +723,6 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer )
m_gal
->
SetLineWidth
(
aText
->
GetThickness
()
);
m_gal
->
SetTextAttributes
(
aText
);
m_gal
->
StrokeText
(
std
::
string
(
aText
->
GetText
().
mb_str
()
),
position
,
orientation
);
}
}
...
...
@@ -830,15 +797,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone )
void
PCB_PAINTER
::
draw
(
const
DIMENSION
*
aDimension
,
int
aLayer
)
{
if
(
aLayer
==
ITEM_GAL_LAYER
(
SELECTION
)
)
{
if
(
aDimension
->
IsSelected
()
)
drawSelectionBox
(
aDimension
);
}
else
{
int
layer
=
aDimension
->
GetLayer
();
COLOR4D
strokeColor
=
m_pcbSettings
->
GetColor
(
aDimension
,
layer
);
COLOR4D
strokeColor
=
m_pcbSettings
->
GetColor
(
aDimension
,
aLayer
);
m_gal
->
SetStrokeColor
(
strokeColor
);
m_gal
->
SetIsFill
(
false
);
...
...
@@ -864,7 +823,6 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer )
m_gal
->
SetLineWidth
(
text
.
GetThickness
()
);
m_gal
->
SetTextAttributes
(
&
text
);
m_gal
->
StrokeText
(
std
::
string
(
text
.
GetText
().
mb_str
()
),
position
,
orientation
);
}
}
...
...
@@ -904,14 +862,4 @@ void PCB_PAINTER::draw( const PCB_TARGET* aTarget )
}
void
PCB_PAINTER
::
drawSelectionBox
(
const
VIEW_ITEM
*
aItem
)
const
{
BOX2I
boundingBox
=
aItem
->
ViewBBox
();
m_gal
->
SetIsStroke
(
false
);
m_gal
->
SetIsFill
(
true
);
m_gal
->
SetFillColor
(
m_pcbSettings
->
GetLayerColor
(
ITEM_GAL_LAYER
(
SELECTION
)
)
);
m_gal
->
DrawRectangle
(
boundingBox
.
GetOrigin
(),
boundingBox
.
GetEnd
()
);
}
const
double
PCB_RENDER_SETTINGS
::
MAX_FONT_SIZE
=
100000000
;
pcbnew/pcb_painter.h
View file @
460dcfc6
...
...
@@ -146,15 +146,11 @@ protected:
void
draw
(
const
SEGVIA
*
,
int
);
void
draw
(
const
D_PAD
*
,
int
);
void
draw
(
const
DRAWSEGMENT
*
);
void
draw
(
const
MODULE
*
,
int
);
void
draw
(
const
TEXTE_PCB
*
,
int
);
void
draw
(
const
TEXTE_MODULE
*
,
int
);
void
draw
(
const
ZONE_CONTAINER
*
);
void
draw
(
const
DIMENSION
*
,
int
);
void
draw
(
const
PCB_TARGET
*
);
/// Draws a white semitransparent box indicating an item as selected
void
drawSelectionBox
(
const
VIEW_ITEM
*
aItem
)
const
;
};
}
// namespace KiGfx
...
...
pcbnew/pcbframe.cpp
View file @
460dcfc6
...
...
@@ -791,7 +791,7 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer )
GetNetnameLayer
(
aLayer
),
ITEM_GAL_LAYER
(
VIAS_VISIBLE
),
ITEM_GAL_LAYER
(
VIAS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_NETNAMES_VISIBLE
),
ITEM_GAL_LAYER
(
SELECTION
),
ITEM_GAL_LAYER
(
GP_OVERLAY
)
ITEM_GAL_LAYER
(
GP_OVERLAY
)
};
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
layers
)
/
sizeof
(
LAYER_NUM
);
++
i
)
...
...
@@ -831,7 +831,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer )
GetNetnameLayer
(
aLayer
),
ITEM_GAL_LAYER
(
VIAS_VISIBLE
),
ITEM_GAL_LAYER
(
VIAS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_HOLES_VISIBLE
),
ITEM_GAL_LAYER
(
PADS_NETNAMES_VISIBLE
),
ITEM_GAL_LAYER
(
SELECTION
),
ITEM_GAL_LAYER
(
GP_OVERLAY
)
ITEM_GAL_LAYER
(
GP_OVERLAY
)
};
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
layers
)
/
sizeof
(
LAYER_NUM
);
++
i
)
...
...
pcbnew/tools/bright_box.h
View file @
460dcfc6
...
...
@@ -52,7 +52,7 @@ public:
}
private
:
static
const
int
BrightBoxLayer
=
ITEM_GAL_LAYER
(
SELECTION
);
static
const
int
BrightBoxLayer
=
ITEM_GAL_LAYER
(
GP_OVERLAY
);
static
const
KiGfx
::
COLOR4D
BrightColor
;
static
const
double
LineWidth
=
100000
.
0
;
...
...
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