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
7207de9b
Commit
7207de9b
authored
Sep 16, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bounding box for dimension.
parent
8a1c97ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
class_dimension.cpp
pcbnew/class_dimension.cpp
+19
-0
class_dimension.h
pcbnew/class_dimension.h
+3
-0
No files found.
pcbnew/class_dimension.cpp
View file @
7207de9b
...
...
@@ -468,6 +468,15 @@ EDA_RECT DIMENSION::GetBoundingBox() const
ymax
=
std
::
max
(
ymax
,
m_featureLineGO
.
y
);
ymax
=
std
::
max
(
ymax
,
m_featureLineGF
.
y
);
xmin
=
std
::
min
(
xmin
,
m_featureLineDO
.
x
);
xmin
=
std
::
min
(
xmin
,
m_featureLineDF
.
x
);
ymin
=
std
::
min
(
ymin
,
m_featureLineDO
.
y
);
ymin
=
std
::
min
(
ymin
,
m_featureLineDF
.
y
);
xmax
=
std
::
max
(
xmax
,
m_featureLineDO
.
x
);
xmax
=
std
::
max
(
xmax
,
m_featureLineDF
.
x
);
ymax
=
std
::
max
(
ymax
,
m_featureLineDO
.
y
);
ymax
=
std
::
max
(
ymax
,
m_featureLineDF
.
y
);
bBox
.
SetX
(
xmin
);
bBox
.
SetY
(
ymin
);
bBox
.
SetWidth
(
xmax
-
xmin
+
1
);
...
...
@@ -489,6 +498,16 @@ wxString DIMENSION::GetSelectMenuText() const
}
const
BOX2I
DIMENSION
::
ViewBBox
()
const
{
BOX2I
dimBBox
=
BOX2I
(
VECTOR2I
(
GetBoundingBox
().
GetPosition
()
),
VECTOR2I
(
GetBoundingBox
().
GetSize
()
)
);
dimBBox
.
Merge
(
m_Text
.
ViewBBox
()
);
return
dimBBox
;
}
void
DIMENSION
::
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
{
// Layer that simply displays the text
...
...
pcbnew/class_dimension.h
View file @
7207de9b
...
...
@@ -144,6 +144,9 @@ public:
EDA_ITEM
*
Clone
()
const
;
/// @copydoc VIEW_ITEM::ViewBBox()
virtual
const
BOX2I
ViewBBox
()
const
;
/// @copydoc VIEW_ITEM::ViewGetLayers()
virtual
void
ViewGetLayers
(
int
aLayers
[],
int
&
aCount
)
const
;
...
...
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