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
fa08d9fd
Commit
fa08d9fd
authored
Aug 04, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed module anchor drawing (GAL).
parent
03a17a28
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
pcb_painter.cpp
pcbnew/pcb_painter.cpp
+14
-11
pcb_painter.h
pcbnew/pcb_painter.h
+1
-1
No files found.
pcbnew/pcb_painter.cpp
View file @
fa08d9fd
...
...
@@ -235,7 +235,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer )
break
;
case
PCB_MODULE_T
:
draw
(
(
MODULE
*
)
item
);
draw
(
(
MODULE
*
)
item
,
aLayer
);
break
;
case
PCB_ZONE_AREA_T
:
...
...
@@ -771,20 +771,23 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer )
}
void
PCB_PAINTER
::
draw
(
const
MODULE
*
aModule
)
void
PCB_PAINTER
::
draw
(
const
MODULE
*
aModule
,
int
aLayer
)
{
const
COLOR4D
color
=
m_pcbSettings
.
GetColor
(
aModule
,
ITEM_GAL_LAYER
(
ANCHOR_VISIBLE
)
);
if
(
aLayer
==
ITEM_GAL_LAYER
(
ANCHOR_VISIBLE
)
)
{
const
COLOR4D
color
=
m_pcbSettings
.
GetColor
(
aModule
,
ITEM_GAL_LAYER
(
ANCHOR_VISIBLE
)
);
// Draw anchor
m_gal
->
SetStrokeColor
(
color
);
m_gal
->
SetLineWidth
(
1.0
);
// Draw anchor
m_gal
->
SetStrokeColor
(
color
);
m_gal
->
SetLineWidth
(
1.0
);
// Keep the size constant, not related to the scale
double
anchorSize
=
5.0
/
m_gal
->
GetWorldScale
();
// Keep the size constant, not related to the scale
double
anchorSize
=
5.0
/
m_gal
->
GetWorldScale
();
VECTOR2D
center
=
aModule
->
GetPosition
();
m_gal
->
DrawLine
(
center
-
VECTOR2D
(
anchorSize
,
0
),
center
+
VECTOR2D
(
anchorSize
,
0
)
);
m_gal
->
DrawLine
(
center
-
VECTOR2D
(
0
,
anchorSize
),
center
+
VECTOR2D
(
0
,
anchorSize
)
);
VECTOR2D
center
=
aModule
->
GetPosition
();
m_gal
->
DrawLine
(
center
-
VECTOR2D
(
anchorSize
,
0
),
center
+
VECTOR2D
(
anchorSize
,
0
)
);
m_gal
->
DrawLine
(
center
-
VECTOR2D
(
0
,
anchorSize
),
center
+
VECTOR2D
(
0
,
anchorSize
)
);
}
}
...
...
pcbnew/pcb_painter.h
View file @
fa08d9fd
...
...
@@ -207,7 +207,7 @@ protected:
void
draw
(
const
DRAWSEGMENT
*
aSegment
,
int
aLayer
);
void
draw
(
const
TEXTE_PCB
*
aText
,
int
aLayer
);
void
draw
(
const
TEXTE_MODULE
*
aText
,
int
aLayer
);
void
draw
(
const
MODULE
*
aModule
);
void
draw
(
const
MODULE
*
aModule
,
int
aLayer
);
void
draw
(
const
ZONE_CONTAINER
*
aZone
);
void
draw
(
const
DIMENSION
*
aDimension
,
int
aLayer
);
void
draw
(
const
PCB_TARGET
*
aTarget
);
...
...
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