4 * \brief Prototypes for transform routines.
8 * <h1><b>Copyright.</b></h1>\n
10 * PCB, interactive printed circuit board design
12 * Copyright (C) 1994,1995,1996 Thomas Nau
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 * Contact addresses for paper mail and Email:
30 * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
32 * Thomas.Nau@rz.uni-ulm.de
40 /* ---------------------------------------------------------------------------
41 * some useful transformation macros and constants
43 #define ROTATE(x,y,x0,y0,n) \
45 Coord dx = (x)-(x0), \
50 case 1: (x)=(x0)+dy; (y)=(y0)-dx; \
52 case 2: (x)=(x0)-dx; (y)=(y0)-dy; \
54 case 3: (x)=(x0)-dy; (y)=(y0)+dx; \
59 #define ROTATE_VIA_LOWLEVEL(v,x0,y0,n) ROTATE((v)->X,(v)->Y,(x0),(y0),(n))
60 #define ROTATE_PIN_LOWLEVEL(p,x0,y0,n) ROTATE((p)->X,(p)->Y,(x0),(y0),(n))
61 #define ROTATE_PAD_LOWLEVEL(p,x0,y0,n) \
62 RotateLineLowLevel(((LineType *) (p)),(x0),(y0),(n))
64 #define ROTATE_TYPES (ELEMENT_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ARC_TYPE)
67 void RotateLineLowLevel (LineType
*, Coord
, Coord
, unsigned);
68 void RotateArcLowLevel (ArcType
*, Coord
, Coord
, unsigned);
69 void RotateBoxLowLevel (BoxType
*, Coord
, Coord
, unsigned);
70 void RotateTextLowLevel (TextType
*, Coord
, Coord
, unsigned);
71 void RotatePolygonLowLevel (PolygonType
*, Coord
, Coord
, unsigned);
72 void RotateElementLowLevel (DataType
*, ElementType
*, Coord
, Coord
, unsigned);
73 void *RotateObject (int, void *, void *, void *, Coord
, Coord
,
75 void RotateScreenObject (Coord
, Coord
, unsigned);