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
e799d7a0
Commit
e799d7a0
authored
Apr 17, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed drawing of PCB_TARGET items.
parent
fde71bdf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
10 deletions
+26
-10
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+26
-10
No files found.
pcbnew/pcb_painter.cpp
View file @
e799d7a0
...
@@ -550,21 +550,37 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension )
...
@@ -550,21 +550,37 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension )
void
PCB_PAINTER
::
draw
(
const
PCB_TARGET
*
aTarget
)
void
PCB_PAINTER
::
draw
(
const
PCB_TARGET
*
aTarget
)
{
{
COLOR4D
strokeColor
=
getLayerColor
(
aTarget
->
GetLayer
(),
0
);
COLOR4D
strokeColor
=
getLayerColor
(
aTarget
->
GetLayer
(),
0
);
double
radius
;
VECTOR2D
position
(
aTarget
->
GetPosition
()
);
double
size
,
radius
;
// according to PCB_TARGET::Draw() (class_mire.cpp)
m_gal
->
SetLineWidth
(
aTarget
->
GetWidth
()
);
if
(
aTarget
->
GetShape
()
)
// shape X
m_gal
->
SetStrokeColor
(
strokeColor
);
m_gal
->
SetIsFill
(
false
);
m_gal
->
SetIsStroke
(
true
);
m_gal
->
Save
();
m_gal
->
Translate
(
position
);
if
(
aTarget
->
GetShape
()
)
{
{
radius
=
aTarget
->
GetSize
()
/
2
;
// shape x
m_gal
->
Rotate
(
M_PI
/
4.0
);
size
=
2.0
*
aTarget
->
GetSize
()
/
3.0
;
radius
=
aTarget
->
GetSize
()
/
2.0
;
}
}
else
else
{
{
radius
=
aTarget
->
GetSize
()
/
3
;
// shape +
size
=
aTarget
->
GetSize
()
/
2.0
;
radius
=
aTarget
->
GetSize
()
/
3.0
;
}
}
m_gal
->
SetStrokeColor
(
strokeColor
);
m_gal
->
DrawLine
(
VECTOR2D
(
-
size
,
0.0
),
m_gal
->
SetIsFill
(
true
);
VECTOR2D
(
size
,
0.0
)
);
m_gal
->
SetIsStroke
(
true
);
m_gal
->
DrawLine
(
VECTOR2D
(
0.0
,
-
size
),
m_gal
->
DrawCircle
(
VECTOR2D
(
aTarget
->
GetPosition
()
),
radius
);
VECTOR2D
(
0.0
,
size
)
);
m_gal
->
DrawCircle
(
VECTOR2D
(
0.0
,
0.0
),
radius
);
m_gal
->
Restore
();
}
}
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