Index: trunk/src/funchash_core_list.h =================================================================== --- trunk/src/funchash_core_list.h (revision 29853) +++ trunk/src/funchash_core_list.h (revision 29854) @@ -40,7 +40,6 @@ action_entry(CycleClip) action_entry(CycleCrosshair) action_entry(DeleteRats) -action_entry(Delta) action_entry(Done) action_entry(Drag) action_entry(DrillReport) @@ -62,7 +61,6 @@ action_entry(Grid) action_entry(Hash) action_entry(Invert) -action_entry(Iseq) action_entry(Layer) action_entry(Layout) action_entry(LayoutAs) @@ -101,7 +99,6 @@ action_entry(RemoveSelected) action_entry(Rename) action_entry(Report) -action_entry(Reset) action_entry(ResetLayerObjects) action_entry(ResetLinesAndPolygons) action_entry(ResetPadstacks) @@ -124,7 +121,6 @@ action_entry(SelectedTexts) action_entry(SelectedVias) action_entry(SelectedRats) -action_entry(Set) action_entry(Sides) action_entry(Sort) action_entry(Start) @@ -141,7 +137,6 @@ action_entry(TextScale) action_entry(Thaw) action_entry(ToLayout) -action_entry(Toggle) action_entry(ToggleAllDirections) action_entry(ToggleAutoDRC) action_entry(ToggleClearLine) Index: trunk/src/librnd/core/funchash.c =================================================================== --- trunk/src/librnd/core/funchash.c (revision 29853) +++ trunk/src/librnd/core/funchash.c (revision 29854) @@ -56,9 +56,18 @@ return strhash_case((char *)k->key) ^ ptrhash((void *)k->cookie); } +#include +#define action_entry(x) { #x, F_ ## x}, +static pcb_funchash_table_t rnd_functions[] = { +#include + {"F_RND_END", F_RND_END} +}; + + void pcb_funchash_init(void) { funchash = htpi_alloc(fh_hash, keyeq); + pcb_funchash_set_table(rnd_functions, PCB_ENTRIES(rnd_functions), NULL); } void pcb_funchash_uninit(void) Index: trunk/src/librnd/core/funchash_core.h =================================================================== --- trunk/src/librnd/core/funchash_core.h (nonexistent) +++ trunk/src/librnd/core/funchash_core.h (revision 29854) @@ -0,0 +1,9 @@ +#include + +#define action_entry(x) F_ ## x, +typedef enum { +F_librnd_function_offset = 16384, +#include +F_RND_END +} rnd_function_id_t; +#undef action_entry Index: trunk/src/librnd/core/funchash_core_list.h =================================================================== --- trunk/src/librnd/core/funchash_core_list.h (nonexistent) +++ trunk/src/librnd/core/funchash_core_list.h (revision 29854) @@ -0,0 +1,5 @@ +action_entry(Delta) +action_entry(Iseq) +action_entry(Set) +action_entry(Reset) +action_entry(Toggle) Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 29853) +++ trunk/src/object_act.c (revision 29854) @@ -45,6 +45,7 @@ #include "undo.h" #include "event.h" #include "funchash_core.h" +#include #include "search.h" #include "draw.h" Index: trunk/src/rats_act.c =================================================================== --- trunk/src/rats_act.c (revision 29853) +++ trunk/src/rats_act.c (revision 29854) @@ -43,6 +43,7 @@ #include "funchash_core.h" #include "obj_rat.h" #include +#include #include "netlist.h" #include "draw.h" Index: trunk/src_plugins/diag/diag.c =================================================================== --- trunk/src_plugins/diag/diag.c (revision 29853) +++ trunk/src_plugins/diag/diag.c (revision 29854) @@ -413,7 +413,7 @@ pcb_board_t *pcb = PCB_ACT_BOARD; pcb_pixmap_t *pxm; pcb_gfx_t *g = pcb_gfx_new(PCB_CURRLAYER(pcb), - PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(200), PCB_MIL_TO_COORD(200), 15, pcb_flag_make(0)); + PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(500), PCB_MIL_TO_COORD(233), PCB_MIL_TO_COORD(233), 15, pcb_flag_make(0)); pxm = rnd_pixmap_load(PCB_ACT_HIDLIB, "A.pnm"); pcb_trace("pxm=%p\n", pxm); Index: trunk/src_plugins/lib_gtk_common/glue_hid.c =================================================================== --- trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 29853) +++ trunk/src_plugins/lib_gtk_common/glue_hid.c (revision 29854) @@ -630,8 +630,13 @@ if (pixmap->hid_data == NULL) ghid_init_pixmap(hid, pixmap); - if (pixmap->hid_data != NULL) - gctx->impl.draw_pixmap(gctx->hidlib, pixmap->hid_data, cx - sx/2, cy - sy/2, sx, sy); + if (pixmap->hid_data != NULL) { + double rsx, rsy, ca = cos(pixmap->tr_rot / PCB_RAD_TO_DEG), sa = sin(pixmap->tr_rot / PCB_RAD_TO_DEG); + rsx = (double)sx * ca + (double)sy * sa; + rsy = (double)sy * ca + (double)sx * sa; +pcb_trace("GUI scale: %mm %mm -> %mm %mm\n", sx, sy, (pcb_coord_t)rsx, (pcb_coord_t)rsy); + gctx->impl.draw_pixmap(gctx->hidlib, pixmap->hid_data, cx - rsx/2.0, cy - rsy/2.0, rsx, rsy); + } } void ghid_glue_hid_init(pcb_hid_t *dst)