pcb 4.1.1
An interactive printed circuit board layout editor.
|
Functions used to rotate pins, elements ... More...
#include <stdlib.h>
#include "global.h"
#include "crosshair.h"
#include "data.h"
#include "draw.h"
#include "error.h"
#include "misc.h"
#include "polygon.h"
#include "rotate.h"
#include "rtree.h"
#include "rubberband.h"
#include "search.h"
#include "select.h"
#include "set.h"
#include "undo.h"
Go to the source code of this file.
Functions | |
static void * | RotateText (LayerType *Layer, TextType *Text) |
Rotates a text object and redraws it. | |
static void * | RotateArc (LayerType *Layer, ArcType *Arc) |
Rotates an arc. | |
static void * | RotateElement (ElementType *Element) |
Rotates an element. | |
static void * | RotateElementName (ElementType *Element) |
Rotates the name of an element. | |
static void * | RotateLinePoint (LayerType *Layer, LineType *Line, PointType *Point) |
Rotates a line's point. | |
void | RotatePointLowLevel (PointType *Point, Coord X, Coord Y, unsigned Number) |
Rotates a point in 90 degree steps. | |
void | RotateLineLowLevel (LineType *Line, Coord X, Coord Y, unsigned Number) |
Rotates a line in 90 degree steps. | |
void | RotateTextLowLevel (TextType *Text, Coord X, Coord Y, unsigned Number) |
Rotates a text in 90 degree steps. | |
void | RotatePolygonLowLevel (PolygonType *Polygon, Coord X, Coord Y, unsigned Number) |
Rotates a polygon in 90 degree steps. | |
void | RotateArcLowLevel (ArcType *Arc, Coord X, Coord Y, unsigned Number) |
Rotates an arc. | |
void | RotateElementLowLevel (DataType *Data, ElementType *Element, Coord X, Coord Y, unsigned Number) |
Rotate an element in 90 degree steps. | |
void | RotateBoxLowLevel (BoxType *Box, Coord X, Coord Y, unsigned Number) |
Rotates a box in 90 degree steps. | |
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. | |
void | RotateScreenObject (Coord X, Coord Y, unsigned Steps) |
Variables | |
static Coord | CenterX |
static Coord | CenterY |
static unsigned | Number |
static ObjectFunctionType | RotateFunctions |
Functions used to rotate pins, elements ...
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.c.
Rotates an arc.
Definition at line 298 of file rotate.c.
References LayerType::arc_tree, CenterX, CenterY, ClearFromPolygon(), PCBType::Data, Draw(), DrawArc(), EraseArc(), Number, PCB, r_delete_entry(), r_insert_entry(), RestoreToPolygon(), and RotateArcLowLevel().
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().
static void * RotateElement | ( | ElementType * | Element | ) | [static] |
Rotates an element.
Definition at line 316 of file rotate.c.
References CenterX, CenterY, PCBType::Data, Draw(), DrawElement(), EraseElement(), Number, PCB, and RotateElementLowLevel().
void RotateElementLowLevel | ( | DataType * | Data, |
ElementType * | Element, | ||
Coord | X, | ||
Coord | Y, | ||
unsigned | Number | ||
) |
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().
static void * RotateElementName | ( | ElementType * | Element | ) | [static] |
Rotates the name of an element.
Definition at line 329 of file rotate.c.
References CenterX, CenterY, PCBType::Data, Draw(), DrawElementName(), ELEMENTTEXT_LOOP, END_LOOP, EraseElementName(), n, DataType::name_tree, Number, PCB, r_delete_entry(), r_insert_entry(), and RotateTextLowLevel().
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().
Rotates a line's point.
Definition at line 267 of file rotate.c.
References CenterX, CenterY, ClearFromPolygon(), PCBType::Data, Draw(), DrawLine(), DrawRat(), EraseLine(), LayerType::line_tree, Number, PCB, r_delete_entry(), r_insert_entry(), DataType::rat_tree, RestoreToPolygon(), RotatePointLowLevel(), and SetLineBoundingBox().
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().
Rotates a point in 90 degree steps.
Definition at line 95 of file rotate.c.
References ROTATE, PointType::X, and PointType::Y.
Referenced by RotateLinePoint(), and RotateObject().
void RotatePolygonLowLevel | ( | PolygonType * | Polygon, |
Coord | X, | ||
Coord | Y, | ||
unsigned | Number | ||
) |
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 object and redraws it.
Definition at line 173 of file rotate.c.
References CenterX, CenterY, ClearFromPolygon(), PCBType::Data, Draw(), DrawText(), EraseText(), Number, PCB, r_delete_entry(), r_insert_entry(), RestoreToPolygon(), RotateTextLowLevel(), and LayerType::text_tree.
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().
Definition at line 74 of file rotate.c.
Referenced by AddObjectToRotateUndoList(), RotateArc(), RotateElement(), RotateElementName(), RotateLinePoint(), RotateObject(), and RotateText().
Definition at line 74 of file rotate.c.
Referenced by AddObjectToRotateUndoList(), RotateArc(), RotateElement(), RotateElementName(), RotateLinePoint(), RotateObject(), and RotateText().
unsigned Number [static] |
Definition at line 75 of file rotate.c.
Referenced by FreeRotateElementLowLevel(), ListsEmpty(), LookupLOConnectionsToLOList(), LookupPVConnectionsToLOList(), PrepareNextLoop(), PrintPadConnections(), ProcNetlist(), QueryInputAndChangeObjectName(), RotateArc(), RotateElement(), RotateElementName(), RotateLinePoint(), RotateObject(), RotateText(), RotateTextLowLevel(), and SetBufferNumber().
ObjectFunctionType RotateFunctions [static] |
{ NULL, RotateText, NULL, NULL, RotateElement, RotateElementName, NULL, NULL, RotateLinePoint, NULL, RotateArc, NULL }