diff pads2gpcb/writeelem.c @ 78:be1fe110b6ab

pads2gpcb: output offset implemented
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 01 Feb 2016 02:22:37 +0000
parents a7f0e9bb3fb7
children
line wrap: on
line diff
--- a/pads2gpcb/writeelem.c	Mon Feb 01 02:18:06 2016 +0000
+++ b/pads2gpcb/writeelem.c	Mon Feb 01 02:22:37 2016 +0000
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include "globals.h"
 #include "struct.h"
 #include "gpcbout.h"
 
@@ -16,8 +17,8 @@
 	char ty_buf[DIM_OUT_BUFSIZE], *ty_str;
 	char *flagstr;
 
-	mx_str = output_gpcb_dimension(body->mark_x, mx_buf);
-	my_str = output_gpcb_dimension(-body->mark_y, my_buf);
+	mx_str = output_gpcb_dimension(body->mark_x + output_x_offset, mx_buf);
+	my_str = output_gpcb_dimension(-body->mark_y + output_y_offset, my_buf);
 	tx_str = output_gpcb_dimension(body->refdes_x, tx_buf);
 	ty_str = output_gpcb_dimension(-body->refdes_y, ty_buf);
 	flagstr = onbottom ? "onsolder" : "";