43 if (ColorTable ==
NULL) {
53 ColorTable = (
struct kl *)
malloc(16*
sizeof(
struct kl));
54 if (ColorTable ==
NULL)
124 fprintf(stderr,
"CD memory allocation failure.\n");
150 return ((
char*)graph);
162 for (i = 0; i < 16; i++) {
163 R = ColorTable[i].
klR/M;
164 G = ColorTable[i].
klG/M;
165 B = ColorTable[i].
klB/M;
348 if (Width <= View->kvFineWindow->kaWidth) {
361 struct ka *Vl, *Vs, *Vf;
470 long X,
Y,Width,Height;
471 double Cratio,Vratio;
490 Cratio = (double) Width/Height;
493 Width = Height*Vratio;
495 Height = Width/Vratio;
510 Cratio = (double) Width/Height;
514 Width = 1.1*Height*Vratio;
542 if (Pointer ==
NULL)
break;
561 if (LBB.
kaTop > *T) {
584 fprintf(fp,
"SCED init file\n");
585 for (i = 0; i < 16; i++) {
586 fprintf(fp,
"%d %3d %3d %3d\n",i,
587 ColorTable[i].klR,ColorTable[i].klG,ColorTable[i].klB);
595 fprintf(fp,
"%s\n",c);
615 for (i = 0; i < 16; i++) {
616 if (fscanf(fp,
"%d %d %d %d\n",&d1,&d2,&d3,&d4) != 4)
618 if (d1 < 0 || d1 > 15)
620 if (d2 < 0 || d2 > 255)
622 if (d3 < 0 || d3 > 255)
624 if (d4 < 0 || d4 > 255)
626 ColorTable[d1].
klR = d2;
627 ColorTable[d1].
klG = d3;
628 ColorTable[d1].
klB = d4;
630 if (fscanf(fp,
"%d %d %d %d\n",&d1,&d2,&d3,&d4) != 4)
723 if (DisplayOrErase ==
ERASE)
731 s[0] = (char)(c & 0xff);
774 int RowOrX,ColumnOrY;
783 DevText(String,RowOrX,ColumnOrY);
854 static void (*
func)(int,int,int,int);
856 static void (*
func)();
924 func = (void(*)(int,int,int,int))
NULL;
938 int x, y, refx, refy;
950 int x, y, refx, refy;
962 int x, y, refx, refy;
980 int x, y, refx, refy;
998 int x, y, refx, refy;
1010 int x, y, refx, refy;
1022 int x, y, refx, refy;
char * FBEdit(char *string)
int kvFineViewportOnBottom
static void correct_cell_view()
struct ka * kvCoarseWindow
struct ka * kvSmallCoarseViewport
#define COARSEVIEWPORTONLY
static void ghost_box_snap()
static void ghost_line_snap()
#define InstanceNameColor
#define FineLToP(X, Y, XT, YT)
#define MenuSelectedColor
void RedisplaySCED(GRAPH *graph)
struct ka * kvFineViewport
struct ka * kvLargeCoarseViewport
void InitFineWindow(long X, long Y)
struct hprlist * FBHyEdit(struct hprlist *htxt)
int kpShowGridInLargeViewport
void FBPolygonClip(long *coord, int *n, struct ka *window)
void ResizeSCED(GRAPH *graph)
struct ka * kvCoarseViewport
#define MenuHighlightingColor
static int get_window_coords()
short FBGetchar(int DisplayOrErase)
void FBPolygon(int Pixel, char Type, long *xy, int n)
static void ghost_place()
char * KbEdit(char *s, int x, int y, int bg, int fg, int cc)
int NextPolygon(POLYGON *p)
struct hprlist * HYedit()
#define MenuSelectedPrefixColor
void SetCurrentAOI(struct ka *Window)
int kpEnableSelectQRedisplay
#define MenuTextPrefixColor
#define CoarseLToP(X, Y, XT, YT)
void FBText(char Mode, int RowOrX, int ColumnOrY, char *String)
#define ClipVP(Viewport, X, Y)
static void ghost_wires()
void FBSetRubberBanding(char mode)
void InitCoarseWindow(long X, long Y, long Width)
void ShowPrompt(char *str)
void PolygonClip(POLYGON *poly, long left, long bottom, long right, long top)
#define HighlightingColor