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
2140efdc
Commit
2140efdc
authored
Apr 24, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Somebody else spelled rectangle as badly as me, fix the mingw build
parent
33616f30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
drawframe.cpp
common/drawframe.cpp
+5
-5
vector2d.h
include/vector2d.h
+7
-7
No files found.
common/drawframe.cpp
View file @
2140efdc
...
...
@@ -675,13 +675,13 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
// client area at the current zoom level.
// visible viewport in device units ~ pixels
wxSize
clientSizeDU
=
m_canvas
->
GetClientSize
();
wxSize
clientSizeDU
=
m_canvas
->
GetClientSize
();
// Size of the client window in IU
DSIZE
clientSizeIU
(
clientSizeDU
.
x
/
scale
,
clientSizeDU
.
y
/
scale
);
DSIZE
clientSizeIU
(
clientSizeDU
.
x
/
scale
,
clientSizeDU
.
y
/
scale
);
// Full drawing or "page" rectangle in internal units
D
RECT
pageRectIU
(
0
,
0
,
GetPageSizeIU
().
x
,
GetPageSizeIU
().
y
);
D
BOX
pageRectIU
(
0
,
0
,
GetPageSizeIU
().
x
,
GetPageSizeIU
().
y
);
// The upper left corner of the client rectangle in internal units.
double
xIU
=
aCenterPositionIU
.
x
-
clientSizeIU
.
x
/
2.0
;
...
...
@@ -695,8 +695,8 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU )
yIU
+=
pageRectIU
.
height
/
2.0
;
}
D
RECT
clientRectIU
(
xIU
,
yIU
,
clientSizeIU
.
x
,
clientSizeIU
.
y
);
DSIZE
virtualSizeIU
;
D
BOX
clientRectIU
(
xIU
,
yIU
,
clientSizeIU
.
x
,
clientSizeIU
.
y
);
DSIZE
virtualSizeIU
;
if
(
pageRectIU
.
GetLeft
()
<
clientRectIU
.
GetLeft
()
&&
pageRectIU
.
GetRight
()
>
clientRectIU
.
GetRight
()
)
{
...
...
include/vector2d.h
View file @
2140efdc
...
...
@@ -327,21 +327,21 @@ template<class T> bool const VECTOR2<T>::operator!=( VECTOR2<T> const& aVector )
/**
* Class
RECT
* is a description of a rectangle in cartesion coordinate system.
* Class
BOX2
* is a description of a rectangle in
a
cartesion coordinate system.
*/
template
<
class
T
>
class
RECT
template
<
class
T
>
class
BOX2
{
public
:
RECT
()
:
x
(
0
),
y
(
0
),
width
(
0
),
height
(
0
)
{}
BOX2
()
:
x
(
0
),
y
(
0
),
width
(
0
),
height
(
0
)
{}
RECT
(
T
aX
,
T
aY
,
T
aWidth
,
T
aHeight
)
:
BOX2
(
T
aX
,
T
aY
,
T
aWidth
,
T
aHeight
)
:
x
(
aX
),
y
(
aY
),
width
(
aWidth
),
height
(
aHeight
)
{}
/// Copy constructor
RECT
(
const
RECT
<
T
>&
aRect
)
:
BOX2
(
const
BOX2
<
T
>&
aRect
)
:
x
(
aRect
.
x
),
y
(
aRect
.
y
),
width
(
aRect
.
width
),
height
(
aRect
.
height
)
{}
...
...
@@ -393,7 +393,7 @@ public:
typedef
VECTOR2
<
double
>
DPOINT
;
typedef
DPOINT
DSIZE
;
typedef
RECT
<
double
>
DRECT
;
typedef
BOX2
<
double
>
DBOX
;
#endif // VECTOR2D_H_
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