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
24c9b705
Commit
24c9b705
authored
Feb 28, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zones are supported by POINT_EDITOR.
parent
d1ffaf0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
point_editor.cpp
pcbnew/tools/point_editor.cpp
+41
-2
No files found.
pcbnew/tools/point_editor.cpp
View file @
24c9b705
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include "point_editor.h"
#include "point_editor.h"
#include <class_drawsegment.h>
#include <class_drawsegment.h>
#include <class_zone.h>
/**
/**
* Class POINT_EDITOR
* Class POINT_EDITOR
...
@@ -52,7 +53,7 @@ public:
...
@@ -52,7 +53,7 @@ public:
{
{
case
PCB_LINE_T
:
case
PCB_LINE_T
:
{
{
DRAWSEGMENT
*
segment
=
static_cast
<
DRAWSEGMENT
*>
(
aItem
);
const
DRAWSEGMENT
*
segment
=
static_cast
<
const
DRAWSEGMENT
*>
(
aItem
);
switch
(
segment
->
GetShape
()
)
switch
(
segment
->
GetShape
()
)
{
{
...
@@ -79,8 +80,19 @@ public:
...
@@ -79,8 +80,19 @@ public:
default
:
// suppress warnings
default
:
// suppress warnings
break
;
break
;
}
}
break
;
}
case
PCB_ZONE_AREA_T
:
{
const
CPolyLine
*
outline
=
static_cast
<
const
ZONE_CONTAINER
*>
(
aItem
)
->
Outline
();
for
(
int
i
=
0
;
i
<
outline
->
GetCornersCount
();
++
i
)
points
->
Add
(
outline
->
GetPos
(
i
)
);
break
;
}
}
break
;
default
:
default
:
break
;
break
;
...
@@ -290,6 +302,21 @@ void POINT_EDITOR::updateItem() const
...
@@ -290,6 +302,21 @@ void POINT_EDITOR::updateItem() const
default
:
// suppress warnings
default
:
// suppress warnings
break
;
break
;
}
}
break
;
}
case
PCB_ZONE_AREA_T
:
{
ZONE_CONTAINER
*
zone
=
static_cast
<
ZONE_CONTAINER
*>
(
item
);
CPolyLine
*
outline
=
zone
->
Outline
();
for
(
int
i
=
0
;
i
<
outline
->
GetCornersCount
();
++
i
)
{
outline
->
SetX
(
i
,
(
*
m_editPoints
)[
i
].
GetPosition
().
x
);
outline
->
SetY
(
i
,
(
*
m_editPoints
)[
i
].
GetPosition
().
y
);
}
break
;
break
;
}
}
...
@@ -330,7 +357,19 @@ void POINT_EDITOR::updatePoints() const
...
@@ -330,7 +357,19 @@ void POINT_EDITOR::updatePoints() const
default
:
// suppress warnings
default
:
// suppress warnings
break
;
break
;
}
}
break
;
}
}
}
case
PCB_ZONE_AREA_T
:
{
const
ZONE_CONTAINER
*
zone
=
static_cast
<
const
ZONE_CONTAINER
*>
(
item
);
const
CPolyLine
*
outline
=
zone
->
Outline
();
for
(
int
i
=
0
;
i
<
outline
->
GetCornersCount
();
++
i
)
(
*
m_editPoints
)[
i
].
SetPosition
(
outline
->
GetPos
(
i
)
);
break
;
break
;
}
}
...
...
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