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
8fda1d22
Commit
8fda1d22
authored
Jul 31, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed drawing of polygon segments (eg. microwave extension traces).
parent
544726e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
+21
-4
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+21
-4
No files found.
pcbnew/pcb_painter.cpp
View file @
8fda1d22
...
@@ -605,13 +605,11 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
...
@@ -605,13 +605,11 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer )
void
PCB_PAINTER
::
draw
(
const
DRAWSEGMENT
*
aSegment
)
void
PCB_PAINTER
::
draw
(
const
DRAWSEGMENT
*
aSegment
)
{
{
COLOR4D
strokeColor
=
getLayerColor
(
aSegment
->
GetLayer
(),
0
,
COLOR4D
color
=
getLayerColor
(
aSegment
->
GetLayer
(),
0
,
aSegment
->
ViewIsHighlighted
()
);
aSegment
->
ViewIsHighlighted
()
);
std
::
deque
<
VECTOR2D
>
pointsList
;
m_gal
->
SetIsFill
(
false
);
m_gal
->
SetIsFill
(
false
);
m_gal
->
SetIsStroke
(
true
);
m_gal
->
SetIsStroke
(
true
);
m_gal
->
SetStrokeColor
(
strokeC
olor
);
m_gal
->
SetStrokeColor
(
c
olor
);
m_gal
->
SetLineWidth
(
aSegment
->
GetWidth
()
);
m_gal
->
SetLineWidth
(
aSegment
->
GetWidth
()
);
switch
(
aSegment
->
GetShape
()
)
switch
(
aSegment
->
GetShape
()
)
...
@@ -636,10 +634,29 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment )
...
@@ -636,10 +634,29 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment )
break
;
break
;
case
S_POLYGON
:
case
S_POLYGON
:
{
std
::
deque
<
VECTOR2D
>
pointsList
;
m_gal
->
SetIsFill
(
true
);
m_gal
->
SetIsStroke
(
false
);
m_gal
->
SetFillColor
(
color
);
m_gal
->
Save
();
m_gal
->
Translate
(
VECTOR2D
(
aSegment
->
GetPosition
()
)
);
MODULE
*
module
=
aSegment
->
GetParentModule
();
if
(
module
)
{
m_gal
->
Rotate
(
-
module
->
GetOrientation
()
*
M_PI
/
1800.0
);
}
std
::
copy
(
aSegment
->
GetPolyPoints
().
begin
(),
aSegment
->
GetPolyPoints
().
end
(),
std
::
copy
(
aSegment
->
GetPolyPoints
().
begin
(),
aSegment
->
GetPolyPoints
().
end
(),
std
::
back_inserter
(
pointsList
)
);
std
::
back_inserter
(
pointsList
)
);
m_gal
->
DrawPolygon
(
pointsList
);
m_gal
->
DrawPolygon
(
pointsList
);
m_gal
->
Restore
();
break
;
break
;
}
case
S_CURVE
:
case
S_CURVE
:
m_gal
->
DrawCurve
(
VECTOR2D
(
aSegment
->
GetStart
()
),
m_gal
->
DrawCurve
(
VECTOR2D
(
aSegment
->
GetStart
()
),
...
...
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