FreeCalypso > hg > ueda-linux
changeset 71:a3d47129ebdc
pads2gpcb: implemented mirroring and rotation of instantiated parts
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Feb 2016 00:13:20 +0000 |
parents | a9a20c85140e |
children | fab9fc646044 |
files | pads2gpcb/partinst.c |
diffstat | 1 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pads2gpcb/partinst.c Mon Feb 01 00:06:43 2016 +0000 +++ b/pads2gpcb/partinst.c Mon Feb 01 00:13:20 2016 +0000 @@ -10,6 +10,11 @@ extern struct part_decal *find_decal_by_name(); extern long convert_input_dim(); +extern void coordpair_mirror_x(); +extern void coordpair_rot_90(); +extern void coordpair_rot_180(); +extern void coordpair_rot_270(); + static struct part_instance *our_part; static void @@ -211,7 +216,24 @@ copy_footprint_body(); our_part->body->mark_x = our_part->mark_x; our_part->body->mark_y = our_part->mark_y; - /* rotation and mirroring to be implemented */ + switch (our_part->ori) { + case 0: + break; + case 90: + manipulate_footprint_coord_pairs(our_part->body, + coordpair_rot_90); + break; + case 180: + manipulate_footprint_coord_pairs(our_part->body, + coordpair_rot_180); + break; + case 270: + manipulate_footprint_coord_pairs(our_part->body, + coordpair_rot_270); + } + if (our_part->onbottom) + manipulate_footprint_coord_pairs(our_part->body, + coordpair_mirror_x); } process_part_section()