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
61550f1a
Commit
61550f1a
authored
Aug 01, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcbnew: work on undo/redo in progress
parent
41c80dd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
class_zone.cpp
pcbnew/class_zone.cpp
+22
-2
No files found.
pcbnew/class_zone.cpp
View file @
61550f1a
...
@@ -999,9 +999,9 @@ void ZONE_CONTAINER::MoveEdge( const wxPoint& offset )
...
@@ -999,9 +999,9 @@ void ZONE_CONTAINER::MoveEdge( const wxPoint& offset )
*/
*/
void
ZONE_CONTAINER
::
Rotate
(
const
wxPoint
&
centre
,
int
angle
)
void
ZONE_CONTAINER
::
Rotate
(
const
wxPoint
&
centre
,
int
angle
)
{
{
wxPoint
pos
;
for
(
unsigned
ii
=
0
;
ii
<
m_Poly
->
corner
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
m_Poly
->
corner
.
size
();
ii
++
)
{
{
wxPoint
pos
;
pos
.
x
=
m_Poly
->
corner
[
ii
].
x
;
pos
.
x
=
m_Poly
->
corner
[
ii
].
x
;
pos
.
y
=
m_Poly
->
corner
[
ii
].
y
;
pos
.
y
=
m_Poly
->
corner
[
ii
].
y
;
RotatePoint
(
&
pos
,
centre
,
angle
);
RotatePoint
(
&
pos
,
centre
,
angle
);
...
@@ -1010,6 +1010,17 @@ void ZONE_CONTAINER::Rotate( const wxPoint& centre, int angle )
...
@@ -1010,6 +1010,17 @@ void ZONE_CONTAINER::Rotate( const wxPoint& centre, int angle )
}
}
m_Poly
->
Hatch
();
m_Poly
->
Hatch
();
/* rotate filled areas: */
for
(
unsigned
ic
=
0
;
ic
<
m_FilledPolysList
.
size
();
ic
++
)
{
CPolyPt
*
corner
=
&
m_FilledPolysList
[
ic
];
pos
.
x
=
corner
->
x
;
pos
.
y
=
corner
->
y
;
RotatePoint
(
&
pos
,
centre
,
angle
);
corner
->
x
=
pos
.
x
;
corner
->
y
=
pos
.
y
;
}
}
}
/**
/**
...
@@ -1034,11 +1045,20 @@ void ZONE_CONTAINER::Mirror( const wxPoint& mirror_ref )
...
@@ -1034,11 +1045,20 @@ void ZONE_CONTAINER::Mirror( const wxPoint& mirror_ref )
for
(
unsigned
ii
=
0
;
ii
<
m_Poly
->
corner
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
m_Poly
->
corner
.
size
();
ii
++
)
{
{
m_Poly
->
corner
[
ii
].
y
-=
mirror_ref
.
y
;
m_Poly
->
corner
[
ii
].
y
-=
mirror_ref
.
y
;
m_Poly
->
corner
[
ii
].
y
=
-
m_Poly
->
corner
[
ii
].
y
;
NEGATE
(
m_Poly
->
corner
[
ii
].
y
)
;
m_Poly
->
corner
[
ii
].
y
+=
mirror_ref
.
y
;
m_Poly
->
corner
[
ii
].
y
+=
mirror_ref
.
y
;
}
}
m_Poly
->
Hatch
();
m_Poly
->
Hatch
();
/* mirror filled areas: */
for
(
unsigned
ic
=
0
;
ic
<
m_FilledPolysList
.
size
();
ic
++
)
{
CPolyPt
*
corner
=
&
m_FilledPolysList
[
ic
];
corner
->
y
-=
mirror_ref
.
y
;
NEGATE
(
corner
->
y
);
corner
->
y
+=
mirror_ref
.
y
;
}
}
}
...
...
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