Index: trunk/src/obj_gfx.c =================================================================== --- trunk/src/obj_gfx.c (revision 31572) +++ trunk/src/obj_gfx.c (revision 31573) @@ -627,7 +627,15 @@ gfx->pxm_id = 0; /* no preference on the ID now */ } +void pcb_gfx_resize_move_corner(pcb_gfx_t *gfx, int corn_idx, rnd_coord_t dx, rnd_coord_t dy, int undoable) +{ + if ((corn_idx < 0) || (corn_idx > 3)) + return; + rnd_trace("pcb_gfx_resize_move_corner pt %d %mm;%mm!\n", corn_idx, dx, dy); +} + + /*** draw ***/ void pcb_gfx_name_invalidate_draw(pcb_gfx_t *gfx) Index: trunk/src/obj_gfx.h =================================================================== --- trunk/src/obj_gfx.h (revision 31572) +++ trunk/src/obj_gfx.h (revision 31573) @@ -84,7 +84,10 @@ /* same but dups pxm so it is never free'd */ void pcb_gfx_set_pixmap_dup(pcb_gfx_t *gfx, const rnd_pixmap_t *pxm, rnd_bool undoable); +/* Request a resize by moving one of the corners relative, by dx;dy */ +void pcb_gfx_resize_move_corner(pcb_gfx_t *gfx, int corn_idx, rnd_coord_t dx, rnd_coord_t dy, int undoable); + /*** hash and eq ***/ int pcb_gfx_eq(const pcb_host_trans_t *tr1, const pcb_gfx_t *g1, const pcb_host_trans_t *tr2, const pcb_gfx_t *g2); unsigned int pcb_gfx_hash(const pcb_host_trans_t *tr, const pcb_gfx_t *g); Index: trunk/src_plugins/tool_std/tool_move.c =================================================================== --- trunk/src_plugins/tool_std/tool_move.c (revision 31572) +++ trunk/src_plugins/tool_std/tool_move.c (revision 31573) @@ -41,6 +41,7 @@ #include "tool_logic.h" #include #include "extobj.h" +#include "obj_gfx.h" void pcb_tool_move_uninit(void) @@ -82,7 +83,13 @@ case PCB_CH_STATE_SECOND: dx = pcb_crosshair.AttachedObject.tx - pcb_crosshair.AttachedObject.X; dy = pcb_crosshair.AttachedObject.ty - pcb_crosshair.AttachedObject.Y; - if ((dx != 0) || (dy != 0)) { + if (pcb_crosshair.AttachedObject.Type == PCB_OBJ_GFX_POINT) { + pcb_gfx_t *gfx = pcb_crosshair.AttachedObject.Ptr2; + rnd_point_t *point = (rnd_point_t *)pcb_crosshair.AttachedObject.Ptr3; + int point_idx = point - gfx->corner; + pcb_gfx_resize_move_corner(gfx, point_idx, dx, dy, 1); + } + else if ((dx != 0) || (dy != 0)) { pcb_any_obj_t *newo = pcb_move_obj_and_rubberband(pcb_crosshair.AttachedObject.Type, pcb_crosshair.AttachedObject.Ptr1, pcb_crosshair.AttachedObject.Ptr2, pcb_crosshair.AttachedObject.Ptr3, dx, dy); pcb_extobj_float_geo(newo); if (!pcb_marked.user_placed)