#include "spice.h"
#include "sced.h"
#include <string.h>
Go to the source code of this file.
|
void | MX () |
|
void | MY () |
|
void | Rotat0 () |
|
void | Rotat90 () |
|
void | Rotat180 () |
|
void | Rotat270 () |
|
static struct ks * | select_items () |
|
static void | sl_free () |
|
static void | sl_bb () |
|
static void | get_BB () |
|
static int | is_BB_visible () |
|
static void | redisplay_edges () |
|
static struct ks * | which_cell () |
|
static void | sq_set_NEW () |
|
static void | sq_delete_dups () |
|
static void | sq_display_selected () |
|
static int | overlap_path () |
|
static int | overlap_line () |
|
static int | cross_line () |
|
static int | point_in_poly () |
|
void | Sel (int *LookedAhead) |
|
void | Area (int *LookedAhead) |
|
void | Desel () |
|
void | Selection (struct ka *AOI) |
|
static struct ks * | select_items (struct ka *AOI, int PointSelect) |
|
static void | sl_free (struct ks *SList) |
|
static void | sl_bb (struct ks *SList, struct ka *BB) |
|
static void | get_BB (struct o *Pointer, struct ka *BB) |
|
static int | is_BB_visible (struct o *Pointer) |
|
static void | redisplay_edges (struct ka *BB) |
|
static struct ks * | which_cell (struct ks *SList) |
|
int | AreTypesInQ (char *Types) |
|
void | SelectTypes (char *Types) |
|
void | SQInit () |
|
void | SQClear () |
|
void | SQInsert (struct o *Pointer) |
|
void | SQDelete (struct o *Pointer) |
|
void | SQComputeBB () |
|
void | SQRestore (int Undo) |
|
void | SQDesel (char *Types) |
|
void | SQShow () |
|
static void | sq_set_NEW (struct o *Pointer) |
|
static void | sq_display_selected (struct o *Pointer) |
|
long * | InPath (int Delta, struct p *Path, long X, long Y) |
|
static int | point_in_poly (int Delta, struct p *Path, long X, long Y) |
|
static int | overlap_path (struct p *Path, struct ka *BB) |
|
static int | overlap_line (struct ka *Line, struct ka *BB) |
|
static int | cross_line (struct ka *Line, struct ka *BB) |
|
#define UpdateBB |
( |
|
BB2, |
|
|
|
BB1 |
|
) |
| |
Value:if (BB1.kaLeft < BB2.kaLeft) BB2.kaLeft = BB1.kaLeft;
\ if (BB1.kaBottom < BB2.kaBottom) BB2.kaBottom = BB1.kaBottom; \
if (BB1.kaRight > BB2.kaRight) BB2.kaRight = BB1.kaRight; \
if (BB1.kaTop > BB2.kaTop) BB2.kaTop = BB1.kaTop;
Definition at line 165 of file choose.c.
void Area |
( |
int * |
LookedAhead | ) |
|
Definition at line 209 of file choose.c.
214 long OldRawX,OldRawY;
215 int FirstTime =
True;
220 ShowPrompt(
"Point to endpoints of diagonal.");
226 if (FirstTime ==
True)
goto quit;
void Selection(struct ka *AOI)
#define Max(Dragon, Eagle)
#define Min(Dragon, Eagle)
void FBSetRubberBanding()
void ShowPrompt(char *str)
int AreTypesInQ |
( |
char * |
Types | ) |
|
static int cross_line |
( |
| ) |
|
|
static |
static int cross_line |
( |
struct ka * |
Line, |
|
|
struct ka* |
BB |
|
) |
| |
|
static |
Definition at line 1220 of file choose.c.
1227 struct ka LineBB,MBB;
1231 if (MBB.kaTop < MBB.kaBottom)
1233 if (MBB.kaRight < MBB.kaLeft)
1236 if (LineBB.kaTop < LineBB.kaBottom)
1237 SwapInts(LineBB.kaTop,LineBB.kaBottom);
1238 if (LineBB.kaRight < LineBB.kaLeft)
1239 SwapInts(LineBB.kaRight,LineBB.kaLeft);
1242 if (LineBB.kaLeft > MBB.kaRight ||
1243 LineBB.kaRight < MBB.kaLeft ||
1244 LineBB.kaBottom > MBB.kaTop ||
1245 LineBB.kaTop < MBB.kaBottom)
#define SwapInts(Dragon, Eagle)
static void get_BB |
( |
struct o * |
Pointer, |
|
|
struct ka * |
BB |
|
) |
| |
|
static |
Definition at line 527 of file choose.c.
struct ka * kvCoarseWindow
long* InPath |
( |
int |
Delta, |
|
|
struct p * |
Path, |
|
|
long |
X, |
|
|
long |
Y |
|
) |
| |
Definition at line 1059 of file choose.c.
1070 double x1,x2,y1,y2,d0,d1,d2,d3,
w;
1073 if (Delta < 10) Delta = 10;
1079 BB.kaLeft = Pair->
pX;
1083 BB.kaRight = Pair->
pX;
1087 BB.kaBottom = Pair->
pY;
1091 BB.kaBottom = Pair->
pSucc->
pY;
1092 BB.kaTop = Pair->
pY;
1095 if (!
InBox(
X,
Y,&BB))
continue;
1108 d3 = (d2 - d1)/(2*sqrt(d0));
1109 w = (d1+d2)/2 - d0/4 - d3*d3;
1111 if (w <= (
long)Delta*Delta) {
1113 d1 = sqrt(fabs(d1-w)/d0);
1114 xy[0] = Pair->
pX + (Pair->
pSucc->
pX - Pair->
pX)*d1;
1115 xy[1] = Pair->
pY + (Pair->
pSucc->
pY - Pair->
pY)*d1;
static int is_BB_visible |
( |
| ) |
|
|
static |
static int is_BB_visible |
( |
struct o * |
Pointer | ) |
|
|
static |
Definition at line 541 of file choose.c.
549 &BB.kaLeft,&BB.kaBottom,&BB.kaRight,&BB.kaTop);
struct ka * kvCoarseWindow
static int overlap_line |
( |
| ) |
|
|
static |
static int overlap_line |
( |
struct ka * |
Line, |
|
|
struct ka* |
BB |
|
) |
| |
|
static |
static int overlap_path |
( |
| ) |
|
|
static |
static int overlap_path |
( |
struct p * |
Path, |
|
|
struct ka * |
BB |
|
) |
| |
|
static |
Definition at line 1167 of file choose.c.
1176 Line.kaBottom = Path->
pY;
1178 for (; Path !=
NULL; Path = Path->
pSucc) {
1179 Line.kaRight = Path->
pX;
1180 Line.kaTop = Path->
pY;
1182 Line.kaLeft = Line.kaRight;
1183 Line.kaBottom = Line.kaTop;
static int overlap_line()
static int point_in_poly |
( |
| ) |
|
|
static |
static int point_in_poly |
( |
int |
Delta, |
|
|
struct p * |
Path, |
|
|
long |
X, |
|
|
long |
Y |
|
) |
| |
|
static |
Definition at line 1124 of file choose.c.
1136 double Xp,Yp,
R,Theta,ThetaLast,Sum,zz;
1140 for (p = Path; p !=
NULL; p = p->
pSucc) {
1144 R = sqrt(Xp*Xp + Yp*Yp);
1145 if (R <= Delta)
return (
True);
1149 Theta = 2*
M_PI + Theta;
1152 Theta =
M_PI - Theta;
1154 zz = (Theta - ThetaLast);
1161 if (fabs(Sum) >= 1.99*
M_PI)
return (
True);
static void redisplay_edges |
( |
| ) |
|
|
static |
static void redisplay_edges |
( |
struct ka * |
BB | ) |
|
|
static |
Definition at line 560 of file choose.c.
569 EdgeOfBB.kaRight = BB->
kaLeft+300;
570 EdgeOfBB.kaTop = BB->
kaTop+300;
571 EdgeOfBB.kaBottom = BB->
kaBottom-300;
576 EdgeOfBB.kaRight = BB->
kaRight+300;
577 EdgeOfBB.kaLeft = BB->
kaRight-300;
578 EdgeOfBB.kaTop = BB->
kaTop+300;
579 EdgeOfBB.kaBottom = BB->
kaBottom-300;
584 EdgeOfBB.kaBottom = BB->
kaBottom-300;
586 EdgeOfBB.kaRight = BB->
kaRight;
587 EdgeOfBB.kaLeft = BB->
kaLeft;
592 EdgeOfBB.kaBottom = BB->
kaTop-300;
593 EdgeOfBB.kaTop = BB->
kaTop+300;
594 EdgeOfBB.kaRight = BB->
kaRight;
595 EdgeOfBB.kaLeft = BB->
kaLeft;
void Sel |
( |
int * |
LookedAhead | ) |
|
Definition at line 174 of file choose.c.
179 int FirstTime =
True;
189 if (FirstTime ==
True)
goto quit;
void Selection(struct ka *AOI)
void ShowPrompt(char *str)
static struct ks* select_items |
( |
| ) |
|
|
static |
static struct ks* select_items |
( |
struct ka * |
AOI, |
|
|
int |
PointSelect |
|
) |
| |
|
static |
Definition at line 374 of file choose.c.
387 struct ks *SPointer =
NULL, *S;
405 if (Pointer ==
NULL)
break;
410 switch (Pointer->
oType) {
412 CDWire(Pointer,&Layer,&Width,&Path);
414 if (
InPath(Delta+(
int)Width/2,Path,
446 if (SPointer ==
NULL)
470 if (Pointer ==
NULL)
break;
473 if (SPointer ==
NULL)
long * InPath(int Delta, struct p *Path, long X, long Y)
static int overlap_path()
static int point_in_poly()
void Selection |
( |
struct ka * |
AOI | ) |
|
Definition at line 281 of file choose.c.
286 struct ks *SList, *S;
287 struct ka BB,OldSelectQBB;
293 if (SList ==
NULL)
return;
343 if (SList ==
NULL)
return;
void SQInsert(struct o *Pointer)
static struct ks * select_items()
static void redisplay_edges()
static struct ks * which_cell()
#define UpdateBB(BB2, BB1)
static void sq_display_selected()
static int is_BB_visible()
void SQDelete(struct o *Pointer)
void SelectTypes |
( |
char * |
Types | ) |
|
Definition at line 657 of file choose.c.
void Selection(struct ka *AOI)
static void sl_bb |
( |
struct ks * |
SList, |
|
|
struct ka * |
BB |
|
) |
| |
|
static |
Definition at line 504 of file choose.c.
#define UpdateBB(BB2, BB1)
static void sl_free |
( |
struct ks * |
SList | ) |
|
|
static |
Definition at line 489 of file choose.c.
494 struct ks *SQDesc,*SQNext;
496 for (SQDesc = SList; SQDesc; SQDesc = SQNext) {
static void sq_delete_dups |
( |
| ) |
|
|
static |
Definition at line 983 of file choose.c.
987 struct ks *SQDesc,*SQDesc1,*SQNext;
990 for (SQDesc =
SelectQHead; SQDesc; SQDesc = SQNext) {
993 for (SQDesc1 = SQDesc->
ksSucc; SQDesc1; SQDesc1 = SQDesc1->
ksSucc)
void SQDelete(struct o *Pointer)
static void sq_display_selected |
( |
| ) |
|
|
static |
static void sq_display_selected |
( |
struct o * |
Pointer | ) |
|
|
static |
Definition at line 1005 of file choose.c.
1016 CDWire(Pointer,&Layer,&Width,&Path);
1022 &BB.kaLeft,&BB.kaBottom,&BB.kaRight,&BB.kaTop);
1051 &BB.kaLeft,&BB.kaBottom,&BB.kaRight,&BB.kaTop);
struct ka * kvCoarseWindow
#define COARSEVIEWPORTONLY
#define HighlightingColor
static void sq_set_NEW |
( |
| ) |
|
|
static |
static void sq_set_NEW |
( |
struct o * |
Pointer | ) |
|
|
static |
Definition at line 690 of file choose.c.
694 struct ks *SQDesc,*SQNext;
696 for (SQDesc =
SelectQHead; SQDesc; SQDesc = SQNext) {
Definition at line 749 of file choose.c.
765 (Info > 10 && Info <= 255)) {
#define UpdateBB(BB2, BB1)
void SQDelete |
( |
struct o * |
Pointer | ) |
|
Definition at line 723 of file choose.c.
728 struct ks *SQDesc,*SQPrev,*SQNext;
732 for (SQDesc =
SelectQHead; SQDesc; SQPrev = SQDesc,SQDesc = SQNext) {
735 if (SQDesc->ksPointer != Pointer)
continue;
void SQDesel |
( |
char * |
Types | ) |
|
Definition at line 900 of file choose.c.
911 struct ks *SQDesc, *SQNext;
916 for (SQDesc =
SelectQHead; SQDesc; SQDesc = SQNext) {
919 if (Types
And !strchr(Types,Type))
continue;
void SQDelete(struct o *Pointer)
void SQInsert |
( |
struct o * |
Pointer | ) |
|
void SQRestore |
( |
int |
Undo | ) |
|
Definition at line 802 of file choose.c.
825 struct ks *SQDesc,*SQNext;
860 for (SQDesc =
SelectQHead; SQDesc; SQDesc = SQNext) {
863 Info = Pointer->
oInfo;
struct prpty * sPrptyList
union prp_data * prpty_Data
static void sq_delete_dups()
struct prpty * prpty_Succ
void SQDelete(struct o *Pointer)
Definition at line 940 of file choose.c.
956 (Info > 10 && Info <= 255)) {
void RedisplayAfterInterrupt()
static void sq_display_selected()
int kpEnableSelectQRedisplay
static struct ks* which_cell |
( |
| ) |
|
|
static |
static struct ks* which_cell |
( |
struct ks * |
SList | ) |
|
|
static |
Definition at line 604 of file choose.c.
616 Area = BB.kaRight - BB.kaLeft;
617 Area *= BB.kaTop - BB.kaBottom;
621 &BB.kaLeft,&BB.kaBottom,&BB.kaRight,&BB.kaTop);
622 A = BB.kaRight - BB.kaLeft;
623 A *= BB.kaTop - BB.kaBottom;
632 sprintf(
TypeOut,
"You have selected an instance of %s.",SymbolName);
static int is_BB_visible()
void Area(int *LookedAhead)
void ShowPrompt(char *str)