mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-30 07:47:10 +02:00
sch2fig/lib.c (draw_arc): handle mirroring
This commit is contained in:
parent
ff12e388e2
commit
538f362b0a
@ -192,6 +192,19 @@ static void draw_arc(const struct arc_obj *arc, int m[6])
|
||||
int sa = angle_add(arc->start_a, a);
|
||||
int ea = angle_add(arc->end_a, a);
|
||||
|
||||
if (matrix_is_mirrored(m)) {
|
||||
sa = 180 - sa;
|
||||
ea = 180 - ea;
|
||||
while (ea < sa)
|
||||
ea += 360;
|
||||
while (ea - sa > 360)
|
||||
ea -= 360;
|
||||
if (ea - sa >= 180) {
|
||||
swap(sa, ea);
|
||||
sa += 360;
|
||||
}
|
||||
}
|
||||
|
||||
fig_arc(x, y, arc->r, sa, ea,
|
||||
COLOR_COMP_DWG, COLOR_NONE, LAYER_COMP_DWG);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user