Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 26001) +++ trunk/scconfig/Rev.h (revision 26002) @@ -1 +1 @@ -static const int myrev = 25853; +static const int myrev = 26000; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 26001) +++ trunk/scconfig/Rev.tab (revision 26002) @@ -1,3 +1,4 @@ +26000 configure hildib: separate polygon generator funtions so they can be reused by hidlib apps 25853 configure new plugin for data access actions 25789 configure centralize the unit selector widget in a DAD compound 25783 congigure hidlib: remove unused parts of the gtk HID Index: trunk/src/polygon1_gen.c =================================================================== --- trunk/src/polygon1_gen.c (revision 26001) +++ trunk/src/polygon1_gen.c (revision 26002) @@ -430,3 +430,28 @@ return ArcPolyNoIntersect(cx, cy, width, height, astart, adelta, thick, 1); } + +/* set up x and y multiplier for an octa poly, depending on square pin style + (used in early versions of pcb-rnd, before custom shape padstacks) */ +void pcb_poly_square_pin_factors(int style, double *xm, double *ym) +{ + int i; + const double factor = 2.0; + + /* reset multipliers */ + for (i = 0; i < 8; i++) { + xm[i] = 1; + ym[i] = 1; + } + + style--; + if (style & 1) + xm[0] = xm[1] = xm[6] = xm[7] = factor; + if (style & 2) + xm[2] = xm[3] = xm[4] = xm[5] = factor; + if (style & 4) + ym[4] = ym[5] = ym[6] = ym[7] = factor; + if (style & 8) + ym[0] = ym[1] = ym[2] = ym[3] = factor; +} + Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 26001) +++ trunk/src_plugins/io_pcb/file.c (revision 26002) @@ -53,6 +53,7 @@ #include "parse_common.h" #include "pcb-printf.h" #include "polygon.h" +#include "polygon1_gen.h" #include "remove.h" #include "flag_str.h" #include "compat_fs.h" Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 26001) +++ trunk/src_plugins/jostle/jostle.c (revision 26002) @@ -24,6 +24,7 @@ #include "rtree.h" #include "undo.h" #include "polygon.h" +#include "polygon1_gen.h" #include "remove.h" #include "error.h" #include "pcb-printf.h" Index: trunk/src_plugins/lib_compat_help/pstk_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 26001) +++ trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 26002) @@ -31,36 +31,12 @@ #include "pstk_compat.h" #include "obj_pstk_inlines.h" #include "compat_misc.h" +#include "polygon1_gen.h" #include "plug_io.h" #define sqr(o) ((double)(o)*(double)(o)) -/* set up x and y multiplier for an octa poly, depending on square pin style */ -void pcb_poly_square_pin_factors(int style, double *xm, double *ym) -{ - int i; - const double factor = 2.0; - - /* reset multipliers */ - for (i = 0; i < 8; i++) { - xm[i] = 1; - ym[i] = 1; - } - - style--; - if (style & 1) - xm[0] = xm[1] = xm[6] = xm[7] = factor; - if (style & 2) - xm[2] = xm[3] = xm[4] = xm[5] = factor; - if (style & 4) - ym[4] = ym[5] = ym[6] = ym[7] = factor; - if (style & 8) - ym[0] = ym[1] = ym[2] = ym[3] = factor; -} - - - /* emulate old pcb-rnd "pin shape" feature */ static void octa_shape(pcb_pstk_poly_t *dst, pcb_coord_t x0, pcb_coord_t y0, pcb_coord_t radius, int style) {