1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-26 23:31:53 +02:00

sch2fig/lib.c (draw_arc): handle mirroring

This commit is contained in:
Werner Almesberger 2016-07-28 15:25:00 -03:00
parent ff12e388e2
commit 538f362b0a

View File

@ -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);