pcb 4.1.1
An interactive printed circuit board layout editor.
|
Prototypes for transform routines. More...
#include "global.h"
Go to the source code of this file.
Defines | |
#define | ROTATE(x, y, x0, y0, n) |
#define | ROTATE_VIA_LOWLEVEL(v, x0, y0, n) ROTATE((v)->X,(v)->Y,(x0),(y0),(n)) |
#define | ROTATE_PIN_LOWLEVEL(p, x0, y0, n) ROTATE((p)->X,(p)->Y,(x0),(y0),(n)) |
#define | ROTATE_PAD_LOWLEVEL(p, x0, y0, n) RotateLineLowLevel(((LineType *) (p)),(x0),(y0),(n)) |
#define | ROTATE_TYPES (ELEMENT_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ARC_TYPE) |
Functions | |
void | RotateLineLowLevel (LineType *, Coord, Coord, unsigned) |
Rotates a line in 90 degree steps. | |
void | RotateArcLowLevel (ArcType *, Coord, Coord, unsigned) |
Rotates an arc. | |
void | RotateBoxLowLevel (BoxType *, Coord, Coord, unsigned) |
Rotates a box in 90 degree steps. | |
void | RotateTextLowLevel (TextType *, Coord, Coord, unsigned) |
Rotates a text in 90 degree steps. | |
void | RotatePolygonLowLevel (PolygonType *, Coord, Coord, unsigned) |
Rotates a polygon in 90 degree steps. | |
void | RotateElementLowLevel (DataType *, ElementType *, Coord, Coord, unsigned) |
Rotate an element in 90 degree steps. | |
void * | RotateObject (int, void *, void *, void *, Coord, Coord, unsigned) |
Rotates an objects at the cursor position as identified by its ID. | |
void | RotateScreenObject (Coord, Coord, unsigned) |
Prototypes for transform routines.
PCB, interactive printed circuit board design
Copyright (C) 1994,1995,1996 Thomas Nau
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Contact addresses for paper mail and Email:
Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
Definition in file rotate.h.
Definition at line 61 of file rotate.h.
Referenced by RotateElementLowLevel().
Definition at line 60 of file rotate.h.
Referenced by RotateElementLowLevel().
#define ROTATE_TYPES (ELEMENT_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ARC_TYPE) |
Definition at line 64 of file rotate.h.
Referenced by RotateScreenObject().
Definition at line 59 of file rotate.h.
Referenced by RotateBuffer().
Rotates an arc.
Definition at line 190 of file rotate.c.
References ArcType::Height, NormalizeAngle(), ArcType::Point1, ArcType::Point2, ROTATE, RotateBoxLowLevel(), ArcType::StartAngle, ArcType::Width, PointType::X, ArcType::X, PointType::Y, and ArcType::Y.
Referenced by RotateArc(), RotateBuffer(), and RotateElementLowLevel().
Rotates a box in 90 degree steps.
Definition at line 348 of file rotate.c.
References MAX, MIN, ROTATE, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by common_draw_pcb_text(), RotateArcLowLevel(), RotateBuffer(), RotatePolygonLowLevel(), RotateTextLowLevel(), and SetTextBoundingBox().
void RotateElementLowLevel | ( | DataType * | , |
ElementType * | , | ||
Coord | , | ||
Coord | , | ||
unsigned | |||
) |
Rotate an element in 90 degree steps.
Definition at line 214 of file rotate.c.
References ARC_LOOP, ClearFromPolygon(), ELEMENTLINE_LOOP, ELEMENTTEXT_LOOP, END_LOOP, PCBType::Font, line, ElementType::MarkX, ElementType::MarkY, n, DataType::name_tree, PAD_LOOP, DataType::pad_tree, PCB, pin, PIN_LOOP, DataType::pin_tree, r_delete_entry(), RestoreToPolygon(), ROTATE, ROTATE_PAD_LOWLEVEL, ROTATE_PIN_LOWLEVEL, RotateArcLowLevel(), RotateLineLowLevel(), RotateTextLowLevel(), and SetElementBoundingBox().
Referenced by ActionElementList(), doPerturb(), RotateBuffer(), and RotateElement().
Rotates a line in 90 degree steps.
Definition at line 104 of file rotate.c.
References ROTATE, and SetLineBoundingBox().
Referenced by common_draw_pcb_text(), RotateBuffer(), and RotateElementLowLevel().
void* RotateObject | ( | int | Type, |
void * | Ptr1, | ||
void * | Ptr2, | ||
void * | Ptr3, | ||
Coord | X, | ||
Coord | Y, | ||
unsigned | Steps | ||
) |
Rotates an objects at the cursor position as identified by its ID.
The center of rotation is determined by the current cursor location.
Definition at line 367 of file rotate.c.
References AddObjectToRotateUndoList(), CrosshairType::AttachedObject, CenterX, CenterY, CLEAR_FLAG, ClearFromPolygon(), Crosshair, PCBType::Data, Draw(), DrawLine(), DrawRat(), EraseLine(), IncrementUndoSerialNumber(), RubberbandType::Layer, RubberbandType::Line, LayerType::line_tree, RubberbandType::MovedPoint, Number, ObjectOperation(), PCB, ptr, ptr2, r_delete_entry(), r_insert_entry(), DataType::rat_tree, RestoreToPolygon(), RotatePointLowLevel(), AttachedObjectType::Rubberband, AttachedObjectType::RubberbandN, SetLineBoundingBox(), X, and Y.
Referenced by RotateScreenObject(), and UndoRotate().
void RotatePolygonLowLevel | ( | PolygonType * | , |
Coord | , | ||
Coord | , | ||
unsigned | |||
) |
Rotates a polygon in 90 degree steps.
Definition at line 159 of file rotate.c.
References END_LOOP, POLYGONPOINT_LOOP, ROTATE, and RotateBoxLowLevel().
Referenced by RotateBuffer().
Definition at line 424 of file rotate.c.
References _, CrosshairType::AttachedObject, Crosshair, LookupRatLines(), LookupRubberbandLines(), Message(), PCB, ptr1, ptr2, ptr3, ROTATE_TYPES, RotateObject(), AttachedObjectType::RubberbandN, SearchScreen(), SetChangedFlag(), and TEST_FLAG.
Referenced by FinishStroke(), and NotifyMode().
Rotates a text in 90 degree steps.
Only the bounding box is rotated, text rotation itself is done by the drawing routines.
Definition at line 140 of file rotate.c.
References TextType::Direction, Number, ROTATE, RotateBoxLowLevel(), TEST_FLAG, TextType::X, and TextType::Y.
Referenced by FreeRotateElementLowLevel(), RotateBuffer(), RotateElementLowLevel(), RotateElementName(), and RotateText().