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
c7b99e1d
Commit
c7b99e1d
authored
May 10, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
committed patch for arcs.
parent
1f7fc494
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
rs274d.cpp
gerbview/rs274d.cpp
+17
-15
No files found.
gerbview/rs274d.cpp
View file @
c7b99e1d
...
...
@@ -288,7 +288,7 @@ static void fillLineTRACK( TRACK* aTrack,
static
void
fillArcTRACK
(
TRACK
*
aTrack
,
int
Dcode_index
,
int
aLayer
,
const
wxPoint
&
aStart
,
const
wxPoint
&
aEnd
,
const
wxPoint
&
rel_center
,
int
aWidth
,
bool
trigo_sens
,
bool
multiquadrant
,
bool
isDark
)
bool
clockwise
,
bool
multiquadrant
,
bool
isDark
)
{
wxPoint
center
,
delta
;
...
...
@@ -299,9 +299,9 @@ static void fillArcTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
if
(
multiquadrant
)
{
center
.
x
=
aStart
.
x
+
rel_center
.
x
;
center
.
y
=
aStart
.
y
-
rel_center
.
y
;
center
.
y
=
aStart
.
y
+
rel_center
.
y
;
if
(
!
trigo_sens
)
if
(
clockwise
)
{
aTrack
->
m_Start
=
aStart
;
aTrack
->
m_End
=
aEnd
;
...
...
@@ -318,29 +318,31 @@ static void fillArcTRACK( TRACK* aTrack, int Dcode_index, int aLayer,
delta
.
x
=
aEnd
.
x
-
aStart
.
x
;
delta
.
y
=
aEnd
.
y
-
aStart
.
y
;
// il faut corriger de signe de rel_center.x et rel_center.y
// selon le quadrant ou on se trouve
if
(
(
delta
.
x
>=
0
)
&&
(
delta
.
y
>=
0
)
)
// 1er quadrant
if
(
(
delta
.
x
>=
0
)
&&
(
delta
.
y
>=
0
)
)
{
center
.
x
=
-
center
.
x
;
// Quadrant 2
}
else
if
(
(
delta
.
x
<
0
)
&&
(
delta
.
y
>=
0
)
)
// 2eme quadrant
else
if
(
(
delta
.
x
>=
0
)
&&
(
delta
.
y
<
0
)
)
{
center
.
x
=
-
center
.
x
;
// Quadrant 1
center
.
y
=
-
center
.
y
;
}
else
if
(
(
delta
.
x
<
0
)
&&
(
delta
.
y
<
0
)
)
// 3eme quadrant
else
if
(
(
delta
.
x
<
0
)
&&
(
delta
.
y
>=
0
)
)
{
center
.
y
=
-
center
.
y
;
// Quadrant 4
center
.
x
=
-
center
.
x
;
}
else
// 4eme qadrant: les 2 coord sont >= 0!
else
{
// Quadrant 3
center
.
x
=
-
center
.
x
;
center
.
y
=
-
center
.
y
;
}
center
.
x
+=
aStart
.
x
;
center
.
y
=
aStart
.
y
+
center
.
y
;
center
.
y
+=
aStart
.
y
;
if
(
trigo_sens
)
if
(
clockwise
)
{
aTrack
->
m_Start
=
aStart
;
aTrack
->
m_End
=
aEnd
;
...
...
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