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
4c777e92
Commit
4c777e92
authored
Aug 02, 2013
by
tomasz.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PCB painter: improve label highlighting
parent
09182d81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+21
-0
No files found.
pcbnew/pcb_painter.cpp
View file @
4c777e92
...
...
@@ -271,6 +271,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
break
;
default
:
printf
(
"painter: unknown item %p type %d
\n
"
,
aItem
,
aItem
->
Type
());
// Painter does not know how to draw the object
return
false
;
break
;
...
...
@@ -679,10 +680,30 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer )
VECTOR2D
position
(
aText
->
GetTextPosition
().
x
,
aText
->
GetTextPosition
().
y
);
double
orientation
=
aText
->
GetDrawRotation
()
*
M_PI
/
1800.0
;
m_gal
->
PushDepth
();
if
(
aText
->
ViewIsHighlighted
())
{
EDA_RECT
bb
(
aText
->
GetBoundingBox
());
VECTOR2D
s
(
bb
.
GetOrigin
());
VECTOR2D
e
(
bb
.
GetEnd
());
m_gal
->
SetFillColor
(
COLOR4D
(
1.0
,
1.0
,
1.0
,
0.3
)
);
m_gal
->
SetStrokeColor
(
COLOR4D
(
1.0
,
1.0
,
1.0
,
0.5
)
);
m_gal
->
SetIsFill
(
true
);
m_gal
->
SetIsStroke
(
true
);
m_gal
->
SetLineWidth
(
0
);
m_gal
->
DrawRectangle
(
s
,
e
);
}
m_gal
->
AdvanceDepth
();
m_gal
->
SetStrokeColor
(
strokeColor
);
m_gal
->
SetLineWidth
(
aText
->
GetThickness
()
);
m_gal
->
SetTextAttributes
(
aText
);
m_gal
->
StrokeText
(
std
::
string
(
aText
->
GetText
().
mb_str
()
),
position
,
orientation
);
m_gal
->
PopDepth
();
}
...
...
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