Index: trunk/src/move.h =================================================================== --- trunk/src/move.h (revision 4576) +++ trunk/src/move.h (revision 4577) @@ -40,39 +40,6 @@ ((ys) += (deltay)); \ } -#define MOVE_VIA_LOWLEVEL(v,dx,dy) \ - { \ - MOVE((v)->X,(v)->Y,(dx),(dy)) \ - MOVE_BOX_LOWLEVEL(&((v)->BoundingBox),(dx),(dy)); \ - } - -#define MOVE_PIN_LOWLEVEL(p,dx,dy) \ - { \ - MOVE((p)->X,(p)->Y,(dx),(dy)) \ - MOVE_BOX_LOWLEVEL(&((p)->BoundingBox),(dx),(dy)); \ - } - -/* Rather than mode the line bounding box, we set it so the point bounding - * boxes are updated too. - */ -#define MOVE_LINE_LOWLEVEL(l,dx,dy) \ - { \ - MOVE((l)->Point1.X,(l)->Point1.Y,(dx),(dy)) \ - MOVE((l)->Point2.X,(l)->Point2.Y,(dx),(dy)) \ - SetLineBoundingBox ((l)); \ - } -#define MOVE_PAD_LOWLEVEL(p,dx,dy) \ - { \ - MOVE((p)->Point1.X,(p)->Point1.Y,(dx),(dy)) \ - MOVE((p)->Point2.X,(p)->Point2.Y,(dx),(dy)) \ - SetPadBoundingBox ((p)); \ - } -#define MOVE_TEXT_LOWLEVEL(t,dx,dy) \ - { \ - MOVE_BOX_LOWLEVEL(&((t)->BoundingBox),(dx),(dy)); \ - MOVE((t)->X, (t)->Y, (dx), (dy)); \ - } - #define MOVE_TYPES \ (PCB_TYPE_VIA | PCB_TYPE_LINE | PCB_TYPE_TEXT | PCB_TYPE_ELEMENT | PCB_TYPE_ELEMENT_NAME | \ PCB_TYPE_POLYGON | PCB_TYPE_POLYGON_POINT | PCB_TYPE_LINE_POINT | PCB_TYPE_ARC) Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 4576) +++ trunk/src/obj_line.h (revision 4577) @@ -62,7 +62,17 @@ void FortyFiveLine(AttachedLineTypePtr); void EnforceLineDRC(void); +/* Rather than mode the line bounding box, we set it so the point bounding + * boxes are updated too. + */ +#define MOVE_LINE_LOWLEVEL(l,dx,dy) \ + { \ + MOVE((l)->Point1.X,(l)->Point1.Y,(dx),(dy)) \ + MOVE((l)->Point2.X,(l)->Point2.Y,(dx),(dy)) \ + SetLineBoundingBox ((l)); \ + } + #define LINE_LOOP(layer) do { \ LineType *line; \ gdl_iterator_t __it__; \ Index: trunk/src/obj_pad.h =================================================================== --- trunk/src/obj_pad.h (revision 4576) +++ trunk/src/obj_pad.h (revision 4577) @@ -35,6 +35,15 @@ PadTypePtr CreateNewPad(ElementTypePtr Element, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, Coord Mask, char *Name, char *Number, FlagType Flags); void SetPadBoundingBox(PadTypePtr Pad); +/* Rather than move the line bounding box, we set it so the point bounding + * boxes are updated too. + */ +#define MOVE_PAD_LOWLEVEL(p,dx,dy) \ + { \ + MOVE((p)->Point1.X,(p)->Point1.Y,(dx),(dy)) \ + MOVE((p)->Point2.X,(p)->Point2.Y,(dx),(dy)) \ + SetPadBoundingBox ((p)); \ + } #define PAD_LOOP(element) do { \ PadType *pad; \ Index: trunk/src/obj_pinvia.h =================================================================== --- trunk/src/obj_pinvia.h (revision 4576) +++ trunk/src/obj_pinvia.h (revision 4577) @@ -39,7 +39,19 @@ void pcb_add_via(DataType *Data, PinType *Via); void SetPinBoundingBox(PinTypePtr Pin); +#define MOVE_VIA_LOWLEVEL(v,dx,dy) \ + { \ + MOVE((v)->X,(v)->Y,(dx),(dy)) \ + MOVE_BOX_LOWLEVEL(&((v)->BoundingBox),(dx),(dy)); \ + } +#define MOVE_PIN_LOWLEVEL(p,dx,dy) \ + { \ + MOVE((p)->X,(p)->Y,(dx),(dy)) \ + MOVE_BOX_LOWLEVEL(&((p)->BoundingBox),(dx),(dy)); \ + } + + #define VIA_LOOP(top) do { \ PinType *via; \ gdl_iterator_t __it__; \ Index: trunk/src/obj_text.h =================================================================== --- trunk/src/obj_text.h (revision 4576) +++ trunk/src/obj_text.h (revision 4577) @@ -49,6 +49,13 @@ void *RemoveText(LayerTypePtr Layer, TextTypePtr Text); void RotateTextLowLevel(TextTypePtr Text, Coord X, Coord Y, unsigned Number); +#define MOVE_TEXT_LOWLEVEL(t,dx,dy) \ + { \ + MOVE_BOX_LOWLEVEL(&((t)->BoundingBox),(dx),(dy)); \ + MOVE((t)->X, (t)->Y, (dx), (dy)); \ + } + + /* Determines if text is actually visible */ #define TEXT_IS_VISIBLE(b, l, t) ((l)->On)