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
2fa6f00b
Commit
2fa6f00b
authored
May 17, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug statements
parent
9fd9e68a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
base_struct.cpp
common/base_struct.cpp
+17
-4
No files found.
common/base_struct.cpp
View file @
2fa6f00b
...
@@ -669,6 +669,16 @@ bool EDA_Rect::Inside( const wxPoint& point )
...
@@ -669,6 +669,16 @@ bool EDA_Rect::Inside( const wxPoint& point )
bool
EDA_Rect
::
Intersects
(
const
EDA_Rect
aRect
)
const
bool
EDA_Rect
::
Intersects
(
const
EDA_Rect
aRect
)
const
{
{
// this logic taken from wxWidgets' geometry.cpp file:
// this logic taken from wxWidgets' geometry.cpp file:
bool
rc
;
#if 0 && defined(DEBUG)
std::cout << "this: ";
std::cout << m_Pos << m_Size << '\n';
std::cout << "aRect: ";
std::cout << aRect.m_Pos << aRect.m_Size;
#endif
int
left
=
MAX
(
m_Pos
.
x
,
aRect
.
m_Pos
.
x
);
int
left
=
MAX
(
m_Pos
.
x
,
aRect
.
m_Pos
.
x
);
int
right
=
MIN
(
m_Pos
.
x
+
m_Size
.
x
,
aRect
.
m_Pos
.
x
+
aRect
.
m_Size
.
x
);
int
right
=
MIN
(
m_Pos
.
x
+
m_Size
.
x
,
aRect
.
m_Pos
.
x
+
aRect
.
m_Size
.
x
);
...
@@ -676,10 +686,13 @@ bool EDA_Rect::Intersects( const EDA_Rect aRect ) const
...
@@ -676,10 +686,13 @@ bool EDA_Rect::Intersects( const EDA_Rect aRect ) const
int
bottom
=
MIN
(
m_Pos
.
y
+
m_Size
.
y
,
aRect
.
m_Pos
.
y
+
aRect
.
m_Size
.
y
);
int
bottom
=
MIN
(
m_Pos
.
y
+
m_Size
.
y
,
aRect
.
m_Pos
.
y
+
aRect
.
m_Size
.
y
);
if
(
left
<
right
&&
top
<
bottom
)
if
(
left
<
right
&&
top
<
bottom
)
{
rc
=
true
;
return
true
;
else
}
rc
=
false
;
return
false
;
//D( std::cout << "rc=" << rc << '\n'; )
return
rc
;
}
}
...
...
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