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
2a45987d
Commit
2a45987d
authored
Sep 03, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Module texts are now moveable, rotatable and flippable.
parent
8a015706
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
class_text_mod.cpp
pcbnew/class_text_mod.cpp
+16
-0
class_text_mod.h
pcbnew/class_text_mod.h
+9
-0
No files found.
pcbnew/class_text_mod.cpp
View file @
2a45987d
...
...
@@ -87,6 +87,22 @@ TEXTE_MODULE::~TEXTE_MODULE()
}
void
TEXTE_MODULE
::
Rotate
(
const
wxPoint
&
aRotCentre
,
double
aAngle
)
{
RotatePoint
(
&
m_Pos
,
aRotCentre
,
aAngle
);
m_Orient
+=
aAngle
;
NORMALIZE_ANGLE_360
(
m_Orient
);
}
void
TEXTE_MODULE
::
Flip
(
const
wxPoint
&
aCentre
)
{
m_Pos
.
y
=
aCentre
.
y
-
(
m_Pos
.
y
-
aCentre
.
y
);
SetLayer
(
FlipLayer
(
GetLayer
()
)
);
m_Mirror
=
!
m_Mirror
;
}
void
TEXTE_MODULE
::
Copy
(
TEXTE_MODULE
*
source
)
{
if
(
source
==
NULL
)
...
...
pcbnew/class_text_mod.h
View file @
2a45987d
...
...
@@ -89,6 +89,15 @@ public:
m_Pos
=
aPos
;
}
void
Move
(
const
wxPoint
&
aMoveVector
)
{
m_Pos
+=
aMoveVector
;
}
void
Rotate
(
const
wxPoint
&
aRotCentre
,
double
aAngle
);
void
Flip
(
const
wxPoint
&
aCentre
);
TEXTE_MODULE
*
Next
()
const
{
return
(
TEXTE_MODULE
*
)
Pnext
;
}
TEXTE_MODULE
*
Back
()
const
{
return
(
TEXTE_MODULE
*
)
Pback
;
}
...
...
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