Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 4997) +++ trunk/doc-rnd/hacking/renames (revision 4998) @@ -768,3 +768,8 @@ RemoveSelected -> pcb_remove_selected RemoveObject -> pcb_remove_object DestroyObject -> pcb_destroy_object +ROTATE -> PCB_ROTATE90 +PIN_ROTATE -> PCB_PIN_ROTATE_SHAPE +ROTATE_VIA_LOWLEVEL -> PCB_VIA_ROTATE90 +ROTATE_PIN_LOWLEVEL -> PCB_PIN_ROTATE90 +ROTATE_PAD_LOWLEVEL -> PCB_PAD_ROTATE90 Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4997) +++ trunk/src/buffer.c (revision 4998) @@ -228,7 +228,7 @@ PCB_VIA_LOOP(Buffer->Data); { r_delete_entry(Buffer->Data->via_tree, (pcb_box_t *) via); - ROTATE_VIA_LOWLEVEL(via, Buffer->X, Buffer->Y, Number); + PCB_VIA_ROTATE90(via, Buffer->X, Buffer->Y, Number); pcb_pin_bbox(via); r_insert_entry(Buffer->Data->via_tree, (pcb_box_t *) via, 0); } @@ -272,7 +272,7 @@ ENDALL_LOOP; /* finally the origin and the bounding box */ - ROTATE(Buffer->X, Buffer->Y, Buffer->X, Buffer->Y, Number); + PCB_ROTATE90(Buffer->X, Buffer->Y, Buffer->X, Buffer->Y, Number); RotateBoxLowLevel(&Buffer->BoundingBox, Buffer->X, Buffer->Y, Number); } Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 4997) +++ trunk/src/obj_arc.c (revision 4998) @@ -529,7 +529,7 @@ /* add Number*90 degrees (i.e., Number quarter-turns) */ Arc->StartAngle = NormalizeAngle(Arc->StartAngle + Number * 90); - ROTATE(Arc->X, Arc->Y, X, Y, Number); + PCB_ROTATE90(Arc->X, Arc->Y, X, Y, Number); /* now change width and height */ if (Number == 1 || Number == 3) { Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4997) +++ trunk/src/obj_elem.c (revision 4998) @@ -1084,7 +1084,7 @@ if (Data) r_delete_entry(Data->pin_tree, (pcb_box_t *) pin); pcb_poly_restore_to_poly(Data, PCB_TYPE_PIN, Element, pin); - ROTATE_PIN_LOWLEVEL(pin, X, Y, Number); + PCB_PIN_ROTATE90(pin, X, Y, Number); } END_LOOP; PCB_PAD_LOOP(Element); @@ -1093,7 +1093,7 @@ if (Data) r_delete_entry(Data->pad_tree, (pcb_box_t *) pad); pcb_poly_restore_to_poly(Data, PCB_TYPE_PAD, Element, pad); - ROTATE_PAD_LOWLEVEL(pad, X, Y, Number); + PCB_PAD_ROTATE90(pad, X, Y, Number); } END_LOOP; PCB_ARC_LOOP(Element); @@ -1101,7 +1101,7 @@ pcb_arc_rotate90(arc, X, Y, Number); } END_LOOP; - ROTATE(Element->MarkX, Element->MarkY, X, Y, Number); + PCB_ROTATE90(Element->MarkX, Element->MarkY, X, Y, Number); /* SetElementBoundingBox reenters the rtree data */ pcb_element_bbox(Data, Element, &PCB->Font); pcb_poly_clear_from_poly(Data, PCB_TYPE_ELEMENT, Element, Element); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 4997) +++ trunk/src/obj_line.c (revision 4998) @@ -620,8 +620,8 @@ /* rotates a line in 90 degree steps */ void pcb_line_rotate90(pcb_line_t *Line, pcb_coord_t X, pcb_coord_t Y, unsigned Number) { - ROTATE(Line->Point1.X, Line->Point1.Y, X, Y, Number); - ROTATE(Line->Point2.X, Line->Point2.Y, X, Y, Number); + PCB_ROTATE90(Line->Point1.X, Line->Point1.Y, X, Y, Number); + PCB_ROTATE90(Line->Point2.X, Line->Point2.Y, X, Y, Number); /* keep horizontal, vertical Point2 > Point1 */ if (Line->Point1.X == Line->Point2.X) { if (Line->Point1.Y > Line->Point2.Y) { Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 4997) +++ trunk/src/obj_poly.c (revision 4998) @@ -123,7 +123,7 @@ { PCB_POLY_POINT_LOOP(Polygon); { - ROTATE(point->X, point->Y, X, Y, Number); + PCB_ROTATE90(point->X, point->Y, X, Y, Number); } END_LOOP; RotateBoxLowLevel(&Polygon->BoundingBox, X, Y, Number); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 4997) +++ trunk/src/obj_text.c (revision 4998) @@ -440,7 +440,7 @@ number = PCB_FLAG_TEST(PCB_FLAG_ONSOLDER, Text) ? (4 - Number) & 3 : Number; RotateBoxLowLevel(&Text->BoundingBox, X, Y, Number); - ROTATE(Text->X, Text->Y, X, Y, Number); + PCB_ROTATE90(Text->X, Text->Y, X, Y, Number); /* set new direction, 0..3, * 0-> to the right, 1-> straight up, Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 4997) +++ trunk/src/rotate.c (revision 4998) @@ -72,7 +72,7 @@ */ void RotatePointLowLevel(pcb_point_t *Point, pcb_coord_t X, pcb_coord_t Y, unsigned Number) { - ROTATE(Point->X, Point->Y, X, Y, Number); + PCB_ROTATE90(Point->X, Point->Y, X, Y, Number); } /* --------------------------------------------------------------------------- @@ -82,8 +82,8 @@ { pcb_coord_t x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2; - ROTATE(x1, y1, X, Y, Number); - ROTATE(x2, y2, X, Y, Number); + PCB_ROTATE90(x1, y1, X, Y, Number); + PCB_ROTATE90(x2, y2, X, Y, Number); Box->X1 = MIN(x1, x2); Box->Y1 = MIN(y1, y2); Box->X2 = MAX(x1, x2); Index: trunk/src/rotate.h =================================================================== --- trunk/src/rotate.h (revision 4997) +++ trunk/src/rotate.h (revision 4998) @@ -35,7 +35,7 @@ /* --------------------------------------------------------------------------- * some useful transformation macros and constants */ -#define ROTATE(x,y,x0,y0,n) \ +#define PCB_ROTATE90(x,y,x0,y0,n) \ { \ pcb_coord_t dx = (x)-(x0), \ dy = (y)-(y0); \ @@ -53,7 +53,7 @@ } /* Rotate pin shape style by n_in * 90 degrees */ -#define PIN_ROTATE(p,n_in) \ +#define PCB_PIN_ROTATE_SHAPE(p,n_in) \ do { \ int _n_; \ for(_n_ = n_in;_n_>0;_n_--) { \ @@ -74,19 +74,19 @@ } \ } while(0) -#define ROTATE_VIA_LOWLEVEL(v,x0,y0,n) \ +#define PCB_VIA_ROTATE90(v,x0,y0,n) \ do { \ - ROTATE((v)->X,(v)->Y,(x0),(y0),(n)); \ - PIN_ROTATE(v, (n)); \ + PCB_ROTATE90((v)->X,(v)->Y,(x0),(y0),(n)); \ + PCB_PIN_ROTATE_SHAPE(v, (n)); \ } while(0) -#define ROTATE_PIN_LOWLEVEL(p,x0,y0,n) \ +#define PCB_PIN_ROTATE90(p,x0,y0,n) \ do { \ - ROTATE((p)->X,(p)->Y,(x0),(y0),(n)); \ - PIN_ROTATE((p), (n)); \ + PCB_ROTATE90((p)->X,(p)->Y,(x0),(y0),(n)); \ + PCB_PIN_ROTATE_SHAPE((p), (n)); \ } while(0) -#define ROTATE_PAD_LOWLEVEL(p,x0,y0,n) \ +#define PCB_PAD_ROTATE90(p,x0,y0,n) \ pcb_line_rotate90(((pcb_line_t *) (p)),(x0),(y0),(n)) #define ROTATE_TYPES (PCB_TYPE_ELEMENT | PCB_TYPE_TEXT | PCB_TYPE_ELEMENT_NAME | PCB_TYPE_ARC)