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
1e04f3b9
Commit
1e04f3b9
authored
Mar 12, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed excessive variable (m_Corners) from MARKER_BASE.
parent
e5b0c720
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
class_marker_base.cpp
common/class_marker_base.cpp
+5
-6
class_marker_base.h
include/class_marker_base.h
+0
-1
No files found.
common/class_marker_base.cpp
View file @
1e04f3b9
...
@@ -19,8 +19,8 @@
...
@@ -19,8 +19,8 @@
// Default marquer shape:
// Default marquer shape:
#define M_SHAPE_SCALE 6
// default scaling factor for MarkerShapeCorners coordinates
const
int
M_SHAPE_SCALE
=
6
;
// default scaling factor for MarkerShapeCorners coordinates
#define CORNERS_COUNT 8
const
int
CORNERS_COUNT
=
8
;
/* corners of the default shape
/* corners of the default shape
* actual coordinates are these values * .m_ScalingFactor
* actual coordinates are these values * .m_ScalingFactor
*/
*/
...
@@ -46,10 +46,10 @@ void MARKER_BASE::init()
...
@@ -46,10 +46,10 @@ void MARKER_BASE::init()
m_Color
=
RED
;
m_Color
=
RED
;
wxPoint
start
=
MarkerShapeCorners
[
0
];
wxPoint
start
=
MarkerShapeCorners
[
0
];
wxPoint
end
=
MarkerShapeCorners
[
0
];
wxPoint
end
=
MarkerShapeCorners
[
0
];
for
(
unsigned
ii
=
0
;
ii
<
CORNERS_COUNT
;
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
CORNERS_COUNT
;
ii
++
)
{
{
wxPoint
corner
=
MarkerShapeCorners
[
ii
];
wxPoint
corner
=
MarkerShapeCorners
[
ii
];
m_Corners
.
push_back
(
corner
);
start
.
x
=
std
::
min
(
start
.
x
,
corner
.
x
);
start
.
x
=
std
::
min
(
start
.
x
,
corner
.
x
);
start
.
y
=
std
::
min
(
start
.
y
,
corner
.
y
);
start
.
y
=
std
::
min
(
start
.
y
,
corner
.
y
);
end
.
x
=
std
::
max
(
end
.
x
,
corner
.
x
);
end
.
x
=
std
::
max
(
end
.
x
,
corner
.
x
);
...
@@ -64,7 +64,6 @@ void MARKER_BASE::init()
...
@@ -64,7 +64,6 @@ void MARKER_BASE::init()
MARKER_BASE
::
MARKER_BASE
(
const
MARKER_BASE
&
aMarker
)
MARKER_BASE
::
MARKER_BASE
(
const
MARKER_BASE
&
aMarker
)
{
{
m_Pos
=
aMarker
.
m_Pos
;
m_Pos
=
aMarker
.
m_Pos
;
m_Corners
=
aMarker
.
m_Corners
;
m_MarkerType
=
aMarker
.
m_MarkerType
;
m_MarkerType
=
aMarker
.
m_MarkerType
;
m_Color
=
aMarker
.
m_Color
;
m_Color
=
aMarker
.
m_Color
;
m_ShapeBoundingBox
=
aMarker
.
m_ShapeBoundingBox
;
m_ShapeBoundingBox
=
aMarker
.
m_ShapeBoundingBox
;
...
@@ -154,9 +153,9 @@ void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDr
...
@@ -154,9 +153,9 @@ void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDr
GRSetDrawMode
(
aDC
,
aDrawMode
);
GRSetDrawMode
(
aDC
,
aDrawMode
);
for
(
unsigned
ii
=
0
;
ii
<
m_Corners
.
size
()
;
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
CORNERS_COUNT
;
ii
++
)
{
{
corners
[
ii
]
=
m_
Corners
[
ii
];
corners
[
ii
]
=
MarkerShape
Corners
[
ii
];
corners
[
ii
].
x
*=
m_ScalingFactor
;
corners
[
ii
].
x
*=
m_ScalingFactor
;
corners
[
ii
].
y
*=
m_ScalingFactor
;
corners
[
ii
].
y
*=
m_ScalingFactor
;
corners
[
ii
]
+=
m_Pos
+
aOffset
;
corners
[
ii
]
+=
m_Pos
+
aOffset
;
...
...
include/class_marker_base.h
View file @
1e04f3b9
...
@@ -13,7 +13,6 @@ class MARKER_BASE
...
@@ -13,7 +13,6 @@ class MARKER_BASE
public
:
public
:
wxPoint
m_Pos
;
///< position of the marker
wxPoint
m_Pos
;
///< position of the marker
protected
:
protected
:
std
::
vector
<
wxPoint
>
m_Corners
;
///< Corner list for shape definition (a polygon)
int
m_MarkerType
;
///< Can be used as a flag
int
m_MarkerType
;
///< Can be used as a flag
EDA_COLOR_T
m_Color
;
///< color
EDA_COLOR_T
m_Color
;
///< color
EDA_RECT
m_ShapeBoundingBox
;
///< Bounding box of the graphic symbol, relative
EDA_RECT
m_ShapeBoundingBox
;
///< Bounding box of the graphic symbol, relative
...
...
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