home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-21 | 34.8 KB | 1,062 lines |
- Newsgroups: comp.sources.x
- From: envbvs@epb12.lbl.gov (Brian V. Smith)
- Subject: v21i024: xfig - Draw amd manipulate objects in an X-Window, Patch02d/16
- Message-ID: <1993Oct21.185801.6835@sparky.sterling.com>
- X-Md4-Signature: 7fded8b7eef88b3b4fa22ff171bca3db
- Sender: chris@sparky.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Thu, 21 Oct 1993 18:58:01 GMT
- Approved: chris@sterling.com
-
- Submitted-by: envbvs@epb12.lbl.gov (Brian V. Smith)
- Posting-number: Volume 21, Issue 24
- Archive-name: xfig/patch02d
- Environment: patch, X11, xfig
- Patch-To: xfig: Volume 19, Issue 113-139
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: xfig.05
- # Wrapped by chris@sparky on Thu Oct 21 13:40:05 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 4 (of 16)."'
- if test -f 'xfig.05' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xfig.05'\"
- else
- echo shar: Extracting \"'xfig.05'\" \(32473 characters\)
- sed "s/^X//" >'xfig.05' <<'END_OF_FILE'
- X points = tmp_p;
- X }
- X+ /* ignore identical points */
- X+ if (npoints > 0 &&
- X+ points[npoints-1].x == (short) x && points[npoints-1].y == (short) y)
- X+ return;
- X points[npoints].x = (short) x;
- X points[npoints].y = (short) y;
- X npoints++;
- X***************
- X*** 292,298 ****
- X double xleft, xright, d, asqr, bsqr;
- X int ymax, yy=0;
- X int k,m,dir;
- X! float savezoom, savexoff, saveyoff;
- X int zoomthick;
- X XPoint *ipnts;
- X
- X--- 296,303 ----
- X double xleft, xright, d, asqr, bsqr;
- X int ymax, yy=0;
- X int k,m,dir;
- X! float savezoom;
- X! int savexoff, saveyoff;
- X int zoomthick;
- X XPoint *ipnts;
- X
- X***************
- X*** 313,319 ****
- X savexoff = zoomxoff;
- X saveyoff = zoomyoff;
- X zoomscale = 1.0;
- X! zoomxoff = zoomyoff = 0.0;
- X
- X cphi = cos((double)angle);
- X sphi = sin((double)angle);
- X--- 318,324 ----
- X savexoff = zoomxoff;
- X saveyoff = zoomyoff;
- X zoomscale = 1.0;
- X! zoomxoff = zoomyoff = 0;
- X
- X cphi = cos((double)angle);
- X sphi = sin((double)angle);
- X***************
- X*** 440,446 ****
- X if (line->eps->file[0] == '\0')
- X string = EMPTY_EPS;
- X else {
- X! string = rindex(line->eps->file, '/');
- X if (string == NULL)
- X string = line->eps->file;
- X else
- X--- 445,451 ----
- X if (line->eps->file[0] == '\0')
- X string = EMPTY_EPS;
- X else {
- X! string = strrchr(line->eps->file, '/');
- X if (string == NULL)
- X string = line->eps->file;
- X else
- X***************
- X*** 453,463 ****
- X ymin = min3(p0->y, p1->y, p2->y);
- X xmax = max3(p0->x, p1->x, p2->x);
- X ymax = max3(p0->y, p1->y, p2->y);
- X! canvas_font = lookfont(0, 12, 0.0); /* get a size 12 font */
- X txt = pf_textwidth(canvas_font, strlen(string), string);
- X x = (xmin + xmax) / 2 - txt.x / 2;
- X y = (ymin + ymax) / 2;
- X! pw_text(canvas_win, x, y, op, canvas_font, string, DEFAULT_COLOR);
- X /* return; */
- X }
- X }
- X--- 458,469 ----
- X ymin = min3(p0->y, p1->y, p2->y);
- X xmax = max3(p0->x, p1->x, p2->x);
- X ymax = max3(p0->y, p1->y, p2->y);
- X! canvas_font = lookfont(0, 12); /* get a size 12 font */
- X txt = pf_textwidth(canvas_font, strlen(string), string);
- X x = (xmin + xmax) / 2 - txt.x / 2;
- X y = (ymin + ymax) / 2;
- X! pw_text(canvas_win, x, y, op, canvas_font,
- X! 0.0, string, DEFAULT_COLOR);
- X /* return; */
- X }
- X }
- X***************
- X*** 832,846 ****
- X {
- X PR_SIZE size;
- X int x,y;
- X- float angle;
- X int xmin, ymin, xmax, ymax;
- X int x1,y1, x2,y2, x3,y3, x4,y4;
- X
- X! if (appres.textoutline) /* get corners of rectangle at actual angle */
- X! text_bound_both(text, &xmin, &ymin, &xmax, &ymax,
- X! &x1,&y1, &x2,&y2, &x3,&y3, &x4,&y4);
- X! else
- X! text_bound(text, &xmin, &ymin, &xmax, &ymax);
- X
- X if (!overlapping(ZOOMX(xmin), ZOOMY(ymin), ZOOMX(xmax), ZOOMY(ymax),
- X clip_xmin, clip_ymin, clip_xmax, clip_ymax))
- X--- 838,848 ----
- X {
- X PR_SIZE size;
- X int x,y;
- X int xmin, ymin, xmax, ymax;
- X int x1,y1, x2,y2, x3,y3, x4,y4;
- X
- X! text_bound(text, &xmin, &ymin, &xmax, &ymax,
- X! &x1,&y1, &x2,&y2, &x3,&y3, &x4,&y4);
- X
- X if (!overlapping(ZOOMX(xmin), ZOOMY(ymin), ZOOMX(xmax), ZOOMY(ymax),
- X clip_xmin, clip_ymin, clip_xmax, clip_ymax))
- X***************
- X*** 856,893 ****
- X
- X x = text->base_x;
- X y = text->base_y;
- X- angle = text->angle*180.0/M_PI;
- X if (text->type == T_CENTER_JUSTIFIED || text->type == T_RIGHT_JUSTIFIED) {
- X size = pf_textwidth(text->fontstruct, strlen(text->cstring),
- X text->cstring);
- X size.x = size.x/zoomscale;
- X if (text->type == T_CENTER_JUSTIFIED) {
- X! if (angle < 90.0 - 0.001)
- X! x -= size.x / 2; /* 0 to 89 degrees */
- X! else if (angle < 180.0 - 0.001)
- X! y += size.x / 2; /* 90 to 179 degrees */
- X! else if (angle < 270.0 - 0.001)
- X! x += size.x / 2; /* 180 to 269 degrees */
- X! else
- X! y -= size.x / 2; /* 270 to 359 degrees */
- X!
- X } else { /* T_RIGHT_JUSTIFIED */
- X! if (angle < 90.0 - 0.001)
- X! x -= size.x; /* 0 to 89 degrees */
- X! else if (angle < 180.0 - 0.001)
- X! y += size.x; /* 90 to 179 degrees */
- X! else if (angle < 270.0 - 0.001)
- X! x += size.x; /* 180 to 269 degrees */
- X! else
- X! y -= size.x; /* 270 to 359 degrees */
- X }
- X }
- X if (hidden_text(text))
- X! pw_text(canvas_win, x, y, op, lookfont(0,12,text->angle),
- X! hidden_text_string, DEFAULT_COLOR);
- X else
- X pw_text(canvas_win, x, y, op, text->fontstruct,
- X! text->cstring, text->color);
- X }
- X
- X /*********************** COMPOUND ***************************/
- X--- 858,881 ----
- X
- X x = text->base_x;
- X y = text->base_y;
- X if (text->type == T_CENTER_JUSTIFIED || text->type == T_RIGHT_JUSTIFIED) {
- X size = pf_textwidth(text->fontstruct, strlen(text->cstring),
- X text->cstring);
- X size.x = size.x/zoomscale;
- X if (text->type == T_CENTER_JUSTIFIED) {
- X! x = round(x-cos(text->angle)*size.x/2);
- X! y = round(y+sin(text->angle)*size.x/2);
- X } else { /* T_RIGHT_JUSTIFIED */
- X! x = round(x-cos(text->angle)*size.x);
- X! y = round(y+sin(text->angle)*size.x);
- X }
- X }
- X if (hidden_text(text))
- X! pw_text(canvas_win, x, y, op, lookfont(0,12),
- X! text->angle, hidden_text_string, DEFAULT_COLOR);
- X else
- X pw_text(canvas_win, x, y, op, text->fontstruct,
- X! text->angle, text->cstring, text->color);
- X }
- X
- X /*********************** COMPOUND ***************************/
- X***************
- X*** 1038,1046 ****
- X dec = 1;
- X }
- X if (xstart == xend && ystart == yend) {
- X! test_succeed = margin = 1;
- X } else {
- X! test_succeed = margin = 1;
- X }
- X
- X if (!add_point(xoff + x, yoff - y))
- X--- 1026,1034 ----
- X dec = 1;
- X }
- X if (xstart == xend && ystart == yend) {
- X! test_succeed = margin = 2;
- X } else {
- X! test_succeed = margin = 3;
- X }
- X
- X if (!add_point(xoff + x, yoff - y))
- X***************
- X*** 1072,1079 ****
- X if (!add_point(xoff + x, yoff - y))
- X break;
- X
- X! if (abs(x - xend) < margin && abs(y - yend) < margin)
- X! test_succeed--;
- X }
- X
- X if (xstart == xend && ystart == yend) /* end points should touch */
- X--- 1060,1068 ----
- X if (!add_point(xoff + x, yoff - y))
- X break;
- X
- X! if ((abs(x - xend) < margin && abs(y - yend) < margin) &&
- X! (x != xend || y != yend))
- X! test_succeed--;
- X }
- X
- X if (xstart == xend && ystart == yend) /* end points should touch */
- Xdiff -rc xfig.2.1.7a/u_elastic.c xfig.2.1.8/u_elastic.c
- X*** xfig.2.1.7a/u_elastic.c Fri Feb 12 09:04:23 1993
- X--- xfig.2.1.8/u_elastic.c Mon Sep 13 16:52:45 1993
- X***************
- X*** 161,177 ****
- X {
- X float angle, dx, dy;
- X
- X if (x == cur_x && y == cur_y)
- X return;
- X
- X dx = x - fix_x;
- X dy = fix_y - y;
- X! if (sqrt((double) (dx * dx + dy * dy)) < 7)
- X return;
- X if (dx == 0)
- X! angle = -90;
- X else
- X! angle = 180 * atan((double) (dy / dx)) / 3.1416;
- X
- X elastic_line();
- X if (manhattan_mode) {
- X--- 161,179 ----
- X {
- X float angle, dx, dy;
- X
- X+ length_msg(MSG_LENGTH);
- X if (x == cur_x && y == cur_y)
- X return;
- X
- X dx = x - fix_x;
- X dy = fix_y - y;
- X! /* only move if the pointer has moved at least 2 pixels */
- X! if (sqrt((double) (dx * dx + dy * dy)) < 2.0)
- X return;
- X if (dx == 0)
- X! angle = -90.0;
- X else
- X! angle = 180.0 * atan((double) (dy / dx)) / M_PI;
- X
- X elastic_line();
- X if (manhattan_mode) {
- X***************
- X*** 187,207 ****
- X else
- X angle90_line(x, y);
- X } else {
- X! if (angle < -45)
- X angle90_line(x, y);
- X! else if (angle < 45)
- X angle0_line(x, y);
- X else
- X angle90_line(x, y);
- X }
- X } else {
- X! if (angle < 0)
- X angle135_line(x, y);
- X else
- X angle45_line(x, y);
- X }
- X elastic_line();
- X- length_msg(MSG_LENGTH);
- X }
- X
- X angle0_line(x, y)
- X--- 189,208 ----
- X else
- X angle90_line(x, y);
- X } else {
- X! if (angle < -45.0)
- X angle90_line(x, y);
- X! else if (angle < 45.0)
- X angle0_line(x, y);
- X else
- X angle90_line(x, y);
- X }
- X } else {
- X! if (angle < 0.0)
- X angle135_line(x, y);
- X else
- X angle45_line(x, y);
- X }
- X elastic_line();
- X }
- X
- X angle0_line(x, y)
- X***************
- X*** 442,449 ****
- X rx = cur_x - fix_x;
- X ry = cur_y - fix_y;
- X if (cur_angle != 0.0) {
- X! angle_ellipse(fix_x, fix_y, rx, ry, cur_angle,
- X! INV_PAINT, 1, RUBBER_LINE, 0.0, 0, DEFAULT_COLOR);
- X } else {
- X x1 = fix_x + rx;
- X x2 = fix_x - rx;
- X--- 443,450 ----
- X rx = cur_x - fix_x;
- X ry = cur_y - fix_y;
- X if (cur_angle != 0.0) {
- X! angle_ellipse(fix_x, fix_y, rx, ry, cur_angle, INV_PAINT, 1,
- X! RUBBER_LINE, 0.0, 0, DEFAULT_COLOR);
- X } else {
- X x1 = fix_x + rx;
- X x2 = fix_x - rx;
- X***************
- X*** 754,760 ****
- X elastic_movetext()
- X {
- X pw_text(canvas_win, cur_x + x1off, cur_y + y1off, INV_PAINT,
- X! new_t->fontstruct, new_t->cstring, new_t->color);
- X }
- X
- X
- X--- 755,762 ----
- X elastic_movetext()
- X {
- X pw_text(canvas_win, cur_x + x1off, cur_y + y1off, INV_PAINT,
- X! new_t->fontstruct, new_t->angle,
- X! new_t->cstring, new_t->color);
- X }
- X
- X
- Xdiff -rc xfig.2.1.7a/u_error.c xfig.2.1.8/u_error.c
- X*** xfig.2.1.7a/u_error.c Mon Mar 29 14:31:49 1993
- X--- xfig.2.1.8/u_error.c Tue Aug 31 10:04:18 1993
- X***************
- X*** 85,91 ****
- X } else
- X fprintf(stderr, "xfig: figure empty or not modified - exiting\n");
- X
- X! quit();
- X }
- X
- X /* ARGSUSED */
- X--- 85,91 ----
- X } else
- X fprintf(stderr, "xfig: figure empty or not modified - exiting\n");
- X
- X! goodbye(); /* finish up and exit */
- X }
- X
- X /* ARGSUSED */
- X***************
- X*** 101,107 ****
- X {
- X return;
- X }
- X- /* free all the GC's */
- X- free_GCs();
- X emergency_quit();
- X }
- X--- 101,105 ----
- Xdiff -rc xfig.2.1.7a/u_fonts.c xfig.2.1.8/u_fonts.c
- X*** xfig.2.1.7a/u_fonts.c Mon Mar 29 14:24:40 1993
- X--- xfig.2.1.8/u_fonts.c Fri Sep 17 10:25:48 1993
- X***************
- X*** 18,32 ****
- X
- X /* printer font names for indicator window */
- X
- X! struct _xfstruct x_fontinfo[NUM_X_FONTS] = {
- X {"-adobe-times-medium-r-*--", (struct xfont*) NULL},
- X {"-adobe-times-medium-i-*--", (struct xfont*) NULL},
- X {"-adobe-times-bold-r-*--", (struct xfont*) NULL},
- X {"-adobe-times-bold-i-*--", (struct xfont*) NULL},
- X! {"-schumacher-clean-medium-r-*--", (struct xfont*) NULL},
- X {"-schumacher-clean-medium-i-*--", (struct xfont*) NULL},
- X {"-schumacher-clean-bold-r-*--", (struct xfont*) NULL},
- X {"-schumacher-clean-bold-i-*--", (struct xfont*) NULL},
- X {"-adobe-courier-medium-r-*--", (struct xfont*) NULL},
- X {"-adobe-courier-medium-o-*--", (struct xfont*) NULL},
- X {"-adobe-courier-bold-r-*--", (struct xfont*) NULL},
- X--- 18,36 ----
- X
- X /* printer font names for indicator window */
- X
- X! struct _xfstruct x_fontinfo[NUM_FONTS] = {
- X {"-adobe-times-medium-r-*--", (struct xfont*) NULL},
- X {"-adobe-times-medium-i-*--", (struct xfont*) NULL},
- X {"-adobe-times-bold-r-*--", (struct xfont*) NULL},
- X {"-adobe-times-bold-i-*--", (struct xfont*) NULL},
- X! {"-schumacher-clean-medium-r-*--", (struct xfont*) NULL}, /* closest to Avant-Garde */
- X {"-schumacher-clean-medium-i-*--", (struct xfont*) NULL},
- X {"-schumacher-clean-bold-r-*--", (struct xfont*) NULL},
- X {"-schumacher-clean-bold-i-*--", (struct xfont*) NULL},
- X+ {"-adobe-times-medium-r-*--", (struct xfont*) NULL}, /* closest to Bookman */
- X+ {"-adobe-times-medium-i-*--", (struct xfont*) NULL},
- X+ {"-adobe-times-bold-r-*--", (struct xfont*) NULL},
- X+ {"-adobe-times-bold-i-*--", (struct xfont*) NULL},
- X {"-adobe-courier-medium-r-*--", (struct xfont*) NULL},
- X {"-adobe-courier-medium-o-*--", (struct xfont*) NULL},
- X {"-adobe-courier-bold-r-*--", (struct xfont*) NULL},
- X***************
- X*** 35,45 ****
- X {"-adobe-helvetica-medium-o-*--", (struct xfont*) NULL},
- X {"-adobe-helvetica-bold-r-*--", (struct xfont*) NULL},
- X {"-adobe-helvetica-bold-o-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-medium-r-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-medium-i-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-bold-r-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-bold-i-*--", (struct xfont*) NULL},
- X! {"-*-lucidabright-medium-r-*--", (struct xfont*) NULL},
- X {"-*-lucidabright-medium-i-*--", (struct xfont*) NULL},
- X {"-*-lucidabright-demibold-r-*--", (struct xfont*) NULL},
- X {"-*-lucidabright-demibold-i-*--", (struct xfont*) NULL},
- X--- 39,53 ----
- X {"-adobe-helvetica-medium-o-*--", (struct xfont*) NULL},
- X {"-adobe-helvetica-bold-r-*--", (struct xfont*) NULL},
- X {"-adobe-helvetica-bold-o-*--", (struct xfont*) NULL},
- X+ {"-adobe-helvetica-medium-r-*--", (struct xfont*) NULL}, /* closest to Helv-nar. */
- X+ {"-adobe-helvetica-medium-o-*--", (struct xfont*) NULL},
- X+ {"-adobe-helvetica-bold-r-*--", (struct xfont*) NULL},
- X+ {"-adobe-helvetica-bold-o-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-medium-r-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-medium-i-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-bold-r-*--", (struct xfont*) NULL},
- X {"-adobe-new century schoolbook-bold-i-*--", (struct xfont*) NULL},
- X! {"-*-lucidabright-medium-r-*--", (struct xfont*) NULL}, /* closest to Palatino */
- X {"-*-lucidabright-medium-i-*--", (struct xfont*) NULL},
- X {"-*-lucidabright-demibold-r-*--", (struct xfont*) NULL},
- X {"-*-lucidabright-demibold-i-*--", (struct xfont*) NULL},
- X***************
- X*** 48,99 ****
- X {"-*-zapfdingbats-*-*-*--", (struct xfont*) NULL},
- X };
- X
- X! struct _fstruct ps_fontinfo[NUM_PS_FONTS + 1] = {
- X {"Default", -1},
- X! {"Times-Roman", 0},
- X! {"Times-Italic", 1},
- X! {"Times-Bold", 2},
- X! {"Times-BoldItalic", 3},
- X! {"AvantGarde-Book", 4},
- X! {"AvantGarde-BookOblique", 5},
- X! {"AvantGarde-Demi", 6},
- X! {"AvantGarde-DemiOblique", 7},
- X! {"Bookman-Light", 0},
- X! {"Bookman-LightItalic", 0},
- X! {"Bookman-Demi", 0},
- X! {"Bookman-DemiItalic", 0},
- X! {"Courier", 8},
- X! {"Courier-Oblique", 9},
- X! {"Courier-Bold", 10},
- X! {"Courier-BoldOblique", 11},
- X! {"Helvetica", 12},
- X! {"Helvetica-Oblique", 13},
- X! {"Helvetica-Bold", 14},
- X! {"Helvetica-BoldOblique", 15},
- X! {"Helvetica-Narrow", 0},
- X! {"Helvetica-Narrow-Oblique", 0},
- X! {"Helvetica-Narrow-Bold", 0},
- X! {"Helvetica-Narrow-BoldOblique", 0},
- X! {"NewCenturySchlbk-Roman", 16},
- X! {"NewCenturySchlbk-Italic", 17},
- X! {"NewCenturySchlbk-Bold", 18},
- X! {"NewCenturySchlbk-BoldItalic", 19},
- X! {"Palatino-Roman", 20},
- X! {"Palatino-Italic", 21},
- X! {"Palatino-Bold", 22},
- X! {"Palatino-BoldItalic", 23},
- X! {"Symbol", 24},
- X! {"ZapfChancery-MediumItalic", 25},
- X! {"ZapfDingbats", 26},
- X };
- X
- X struct _fstruct latex_fontinfo[NUM_LATEX_FONTS] = {
- X! {"Default", 0},
- X! {"Roman", 0},
- X! {"Bold", 2},
- X! {"Italic", 1},
- X! {"Modern", 12},
- X! {"Typewriter", 8},
- X };
- X
- X x_fontnum(psflag, fnum)
- X--- 56,107 ----
- X {"-*-zapfdingbats-*-*-*--", (struct xfont*) NULL},
- X };
- X
- X! struct _fstruct ps_fontinfo[NUM_FONTS + 1] = {
- X {"Default", -1},
- X! {"Times-Roman", 0},
- X! {"Times-Italic", 1},
- X! {"Times-Bold", 2},
- X! {"Times-BoldItalic", 3},
- X! {"AvantGarde-Book", 4},
- X! {"AvantGarde-BookOblique", 5},
- X! {"AvantGarde-Demi", 6},
- X! {"AvantGarde-DemiOblique", 7},
- X! {"Bookman-Light", 8},
- X! {"Bookman-LightItalic", 9},
- X! {"Bookman-Demi", 10},
- X! {"Bookman-DemiItalic", 11},
- X! {"Courier", 12},
- X! {"Courier-Oblique", 13},
- X! {"Courier-Bold", 14},
- X! {"Courier-BoldOblique", 15},
- X! {"Helvetica", 16},
- X! {"Helvetica-Oblique", 17},
- X! {"Helvetica-Bold", 18},
- X! {"Helvetica-BoldOblique", 19},
- X! {"Helvetica-Narrow", 20},
- X! {"Helvetica-Narrow-Oblique", 21},
- X! {"Helvetica-Narrow-Bold", 22},
- X! {"Helvetica-Narrow-BoldOblique", 23},
- X! {"NewCenturySchlbk-Roman", 24},
- X! {"NewCenturySchlbk-Italic", 25},
- X! {"NewCenturySchlbk-Bold", 26},
- X! {"NewCenturySchlbk-BoldItalic", 27},
- X! {"Palatino-Roman", 28},
- X! {"Palatino-Italic", 29},
- X! {"Palatino-Bold", 30},
- X! {"Palatino-BoldItalic", 31},
- X! {"Symbol", 32},
- X! {"ZapfChancery-MediumItalic", 33},
- X! {"ZapfDingbats", 34},
- X };
- X
- X struct _fstruct latex_fontinfo[NUM_LATEX_FONTS] = {
- X! {"Default", 0},
- X! {"Roman", 0},
- X! {"Bold", 2},
- X! {"Italic", 1},
- X! {"Modern", 16},
- X! {"Typewriter", 12},
- X };
- X
- X x_fontnum(psflag, fnum)
- X***************
- X*** 110,116 ****
- X
- X if (font == NULL)
- X return(DEF_PS_FONT);
- X! for (i=0; i<NUM_PS_FONTS; i++)
- X if (strcmp(ps_fontinfo[i].name, font) == 0)
- X return (i-1);
- X return(DEF_PS_FONT);
- X--- 118,124 ----
- X
- X if (font == NULL)
- X return(DEF_PS_FONT);
- X! for (i=0; i<NUM_FONTS; i++)
- X if (strcmp(ps_fontinfo[i].name, font) == 0)
- X return (i-1);
- X return(DEF_PS_FONT);
- Xdiff -rc xfig.2.1.7a/u_fonts.h xfig.2.1.8/u_fonts.h
- X*** xfig.2.1.7a/u_fonts.h Wed Jan 6 15:02:53 1993
- X--- xfig.2.1.8/u_fonts.h Mon Aug 23 15:23:31 1993
- X***************
- X*** 20,27 ****
- X #define LATEX_FONTPANE_WD 112
- X #define PS_FONTPANE_HT 20
- X #define LATEX_FONTPANE_HT 20
- X! #define NUM_X_FONTS 27
- X! #define NUM_PS_FONTS 35
- X #define NUM_LATEX_FONTS 6
- X
- X /* element of linked list for each font
- X--- 20,26 ----
- X #define LATEX_FONTPANE_WD 112
- X #define PS_FONTPANE_HT 20
- X #define LATEX_FONTPANE_HT 20
- X! #define NUM_FONTS 35
- X #define NUM_LATEX_FONTS 6
- X
- X /* element of linked list for each font
- X***************
- X*** 33,47 ****
- X int size; /* size in points */
- X Font fid; /* X font id */
- X char *fname; /* actual name of X font found */
- X! struct flist *list; /* list of fonts by angle */
- X struct xfont *next; /* next in the list */
- X };
- X-
- X- struct flist {
- X- int dir; /* direction (0=0 degrees, 1=90, 2=180, 3=270) */
- X- XRotFontStruct *fstruct; /* X font structure */
- X- struct flist *next;
- X- };
- X
- X struct _fstruct {
- X char *name; /* Postscript font name */
- X--- 32,40 ----
- X int size; /* size in points */
- X Font fid; /* X font id */
- X char *fname; /* actual name of X font found */
- X! XFontStruct *fstruct; /* X font structure */
- X struct xfont *next; /* next in the list */
- X };
- X
- X struct _fstruct {
- X char *name; /* Postscript font name */
- Xdiff -rc xfig.2.1.7a/u_free.c xfig.2.1.8/u_free.c
- X*** xfig.2.1.7a/u_free.c Wed Jan 6 12:03:02 1993
- X--- xfig.2.1.8/u_free.c Tue May 11 09:08:41 1993
- X***************
- X*** 169,175 ****
- X int i;
- X
- X XFreeGC(tool_d, gc);
- X- XFreeGC(tool_d, bold_gc);
- X XFreeGC(tool_d, button_gc);
- X XFreeGC(tool_d, color_gc);
- X XFreeGC(tool_d, ind_button_gc);
- X--- 169,174 ----
- Xdiff -rc xfig.2.1.7a/u_markers.c xfig.2.1.8/u_markers.c
- X*** xfig.2.1.7a/u_markers.c Wed Dec 9 17:15:16 1992
- X--- xfig.2.1.8/u_markers.c Wed Jun 16 14:55:28 1993
- X***************
- X*** 40,47 ****
- X int x, y;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win, x - 2, y - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, x - 1, y - 1, 3, 3, 0, 0);
- X }
- X
- X ellipse_in_mask()
- X--- 40,47 ----
- X int x, y;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win, x - 2, y - 2, MARK_SIZ, MARK_SIZ, 0, 0);
- X! set_marker(canvas_win, x - 1, y - 1, MARK_SIZ-2, MARK_SIZ-2, 0, 0);
- X }
- X
- X ellipse_in_mask()
- X***************
- X*** 271,278 ****
- X F_ellipse *e;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win, e->start.x - 2, e->start.y - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, e->end.x - 2, e->end.y - 2, 5, 5, 0, 0);
- X if (e->tagged)
- X toggle_ellipsehighlight(e);
- X }
- X--- 271,278 ----
- X F_ellipse *e;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win, e->start.x - 2, e->start.y - 2, MARK_SIZ, MARK_SIZ, 0, 0);
- X! set_marker(canvas_win, e->end.x - 2, e->end.y - 2, MARK_SIZ, MARK_SIZ, 0, 0);
- X if (e->tagged)
- X toggle_ellipsehighlight(e);
- X }
- X***************
- X*** 282,290 ****
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X set_marker(canvas_win, e->start.x, e->start.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, e->start.x - 1, e->start.y - 1, 3, 3, 0, 0);
- X set_marker(canvas_win, e->end.x, e->end.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, e->end.x - 1, e->end.y - 1, 3, 3, 0, 0);
- X }
- X
- X toggle_arcmarker(a)
- X--- 282,290 ----
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X set_marker(canvas_win, e->start.x, e->start.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, e->start.x - 1, e->start.y - 1, SM_MARK, SM_MARK, 0, 0);
- X set_marker(canvas_win, e->end.x, e->end.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, e->end.x - 1, e->end.y - 1, SM_MARK, SM_MARK, 0, 0);
- X }
- X
- X toggle_arcmarker(a)
- X***************
- X*** 291,299 ****
- X F_arc *a;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win, a->point[0].x - 2, a->point[0].y - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, a->point[1].x - 2, a->point[1].y - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, a->point[2].x - 2, a->point[2].y - 2, 5, 5, 0, 0);
- X if (a->tagged)
- X toggle_archighlight(a);
- X }
- X--- 291,299 ----
- X F_arc *a;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win,a->point[0].x-2,a->point[0].y-2,MARK_SIZ,MARK_SIZ,0,0);
- X! set_marker(canvas_win,a->point[1].x-2,a->point[1].y-2,MARK_SIZ,MARK_SIZ,0,0);
- X! set_marker(canvas_win,a->point[2].x-2,a->point[2].y-2,MARK_SIZ,MARK_SIZ,0,0);
- X if (a->tagged)
- X toggle_archighlight(a);
- X }
- X***************
- X*** 303,313 ****
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X set_marker(canvas_win, a->point[0].x, a->point[0].y, 1, 1, 0, 0);
- X! set_marker(canvas_win, a->point[0].x - 1, a->point[0].y - 1, 3, 3, 0, 0);
- X set_marker(canvas_win, a->point[1].x, a->point[1].y, 1, 1, 0, 0);
- X! set_marker(canvas_win, a->point[1].x - 1, a->point[1].y - 1, 3, 3, 0, 0);
- X set_marker(canvas_win, a->point[2].x, a->point[2].y, 1, 1, 0, 0);
- X! set_marker(canvas_win, a->point[2].x - 1, a->point[2].y - 1, 3, 3, 0, 0);
- X }
- X
- X toggle_textmarker(t)
- X--- 303,313 ----
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X set_marker(canvas_win, a->point[0].x, a->point[0].y, 1, 1, 0, 0);
- X! set_marker(canvas_win, a->point[0].x-1, a->point[0].y-1, SM_MARK, SM_MARK, 0, 0);
- X set_marker(canvas_win, a->point[1].x, a->point[1].y, 1, 1, 0, 0);
- X! set_marker(canvas_win, a->point[1].x-1, a->point[1].y-1, SM_MARK, SM_MARK, 0, 0);
- X set_marker(canvas_win, a->point[2].x, a->point[2].y, 1, 1, 0, 0);
- X! set_marker(canvas_win, a->point[2].x-1, a->point[2].y-1, SM_MARK, SM_MARK, 0, 0);
- X }
- X
- X toggle_textmarker(t)
- X***************
- X*** 319,326 ****
- X /* adjust for text angle */
- X dy = (int) ((double) t->height * cos(t->angle));
- X dx = (int) ((double) t->height * sin(t->angle));
- X! set_marker(canvas_win, t->base_x - dx - 2, t->base_y - dy - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, t->base_x - 2, t->base_y - 2, 5, 5, 0, 0);
- X if (t->tagged)
- X toggle_texthighlight(t);
- X }
- X--- 319,326 ----
- X /* adjust for text angle */
- X dy = (int) ((double) t->height * cos(t->angle));
- X dx = (int) ((double) t->height * sin(t->angle));
- X! set_marker(canvas_win,t->base_x-dx-2,t->base_y-dy-2,MARK_SIZ,MARK_SIZ,0,0);
- X! set_marker(canvas_win,t->base_x-2,t->base_y-2,MARK_SIZ,MARK_SIZ,0,0);
- X if (t->tagged)
- X toggle_texthighlight(t);
- X }
- X***************
- X*** 334,343 ****
- X /* adjust for text angle */
- X dy = (int) ((double) t->height * cos(t->angle));
- X dx = (int) ((double) t->height * sin(t->angle));
- X! set_marker(canvas_win, t->base_x - dx, t->base_y - dy, 1, 1, 0, 0);
- X! set_marker(canvas_win, t->base_x - dx - 1, t->base_y - dy - 1, 3, 3, 0, 0);
- X set_marker(canvas_win, t->base_x, t->base_y, 1, 1, 0, 0);
- X! set_marker(canvas_win, t->base_x - 1, t->base_y - 1, 3, 3, 0, 0);
- X }
- X
- X toggle_all_compoundmarkers()
- X--- 334,343 ----
- X /* adjust for text angle */
- X dy = (int) ((double) t->height * cos(t->angle));
- X dx = (int) ((double) t->height * sin(t->angle));
- X! set_marker(canvas_win, t->base_x-dx, t->base_y-dy, 1, 1, 0, 0);
- X! set_marker(canvas_win, t->base_x-dx-1, t->base_y-dy-1, SM_MARK, SM_MARK, 0, 0);
- X set_marker(canvas_win, t->base_x, t->base_y, 1, 1, 0, 0);
- X! set_marker(canvas_win, t->base_x-1, t->base_y-1, SM_MARK, SM_MARK, 0, 0);
- X }
- X
- X toggle_all_compoundmarkers()
- X***************
- X*** 351,360 ****
- X F_compound *c;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win, c->nwcorner.x - 2, c->nwcorner.y - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, c->secorner.x - 2, c->secorner.y - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, c->nwcorner.x - 2, c->secorner.y - 2, 5, 5, 0, 0);
- X! set_marker(canvas_win, c->secorner.x - 2, c->nwcorner.y - 2, 5, 5, 0, 0);
- X if (c->tagged)
- X toggle_compoundhighlight(c);
- X }
- X--- 351,360 ----
- X F_compound *c;
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X! set_marker(canvas_win,c->nwcorner.x-2,c->nwcorner.y-2,MARK_SIZ,MARK_SIZ,0,0);
- X! set_marker(canvas_win,c->secorner.x-2,c->secorner.y-2,MARK_SIZ,MARK_SIZ,0,0);
- X! set_marker(canvas_win,c->nwcorner.x-2,c->secorner.y-2,MARK_SIZ,MARK_SIZ,0,0);
- X! set_marker(canvas_win,c->secorner.x-2,c->nwcorner.y-2,MARK_SIZ,MARK_SIZ,0,0);
- X if (c->tagged)
- X toggle_compoundhighlight(c);
- X }
- X***************
- X*** 364,376 ****
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X set_marker(canvas_win, c->nwcorner.x, c->nwcorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->nwcorner.x - 1, c->nwcorner.y - 1, 3, 3, 0, 0);
- X set_marker(canvas_win, c->secorner.x, c->secorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->secorner.x - 1, c->secorner.y - 1, 3, 3, 0, 0);
- X set_marker(canvas_win, c->nwcorner.x, c->secorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->nwcorner.x - 1, c->secorner.y - 1, 3, 3, 0, 0);
- X set_marker(canvas_win, c->secorner.x, c->nwcorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->secorner.x - 1, c->nwcorner.y - 1, 3, 3, 0, 0);
- X }
- X
- X toggle_linemarker(l)
- X--- 364,376 ----
- X {
- X set_line_stuff(1, RUBBER_LINE, 0.0, (INV_PAINT), DEFAULT_COLOR);
- X set_marker(canvas_win, c->nwcorner.x, c->nwcorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->nwcorner.x-1, c->nwcorner.y-1, SM_MARK, SM_MARK, 0, 0);
- X set_marker(canvas_win, c->secorner.x, c->secorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->secorner.x-1, c->secorner.y-1, SM_MARK, SM_MARK, 0, 0);
- X set_marker(canvas_win, c->nwcorner.x, c->secorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->nwcorner.x-1, c->secorner.y-1, SM_MARK, SM_MARK, 0, 0);
- X set_marker(canvas_win, c->secorner.x, c->nwcorner.y, 1, 1, 0, 0);
- X! set_marker(canvas_win, c->secorner.x-1, c->nwcorner.y-1, SM_MARK, SM_MARK, 0, 0);
- X }
- X
- X toggle_linemarker(l)
- X***************
- X*** 386,395 ****
- X for (p = p->next; p != NULL; p = p->next) {
- X x = p->x;
- X y = p->y;
- X! set_marker(canvas_win, x - 2, y - 2, 5, 5, 0, 0);
- X }
- X if (x != fx || y != fy || l->points->next == NULL) {
- X! set_marker(canvas_win, fx - 2, fy - 2, 5, 5, 0, 0);
- X }
- X if (l->tagged)
- X toggle_linehighlight(l);
- X--- 386,395 ----
- X for (p = p->next; p != NULL; p = p->next) {
- X x = p->x;
- X y = p->y;
- X! set_marker(canvas_win, x - 2, y - 2, MARK_SIZ, MARK_SIZ, 0, 0);
- X }
- X if (x != fx || y != fy || l->points->next == NULL) {
- X! set_marker(canvas_win, fx - 2, fy - 2, MARK_SIZ, MARK_SIZ, 0, 0);
- X }
- X if (l->tagged)
- X toggle_linehighlight(l);
- X***************
- X*** 409,419 ****
- X x = p->x;
- X y = p->y;
- X set_marker(canvas_win, x, y, 1, 1, 0, 0);
- X! set_marker(canvas_win, x - 1, y - 1, 3, 3, 0, 0);
- X }
- X if (x != fx || y != fy) {
- X set_marker(canvas_win, fx, fy, 1, 1, 0, 0);
- X! set_marker(canvas_win, fx - 1, fy - 1, 3, 3, 0, 0);
- X }
- X }
- X
- X--- 409,419 ----
- X x = p->x;
- X y = p->y;
- X set_marker(canvas_win, x, y, 1, 1, 0, 0);
- X! set_marker(canvas_win, x - 1, y - 1, SM_MARK, SM_MARK, 0, 0);
- X }
- X if (x != fx || y != fy) {
- X set_marker(canvas_win, fx, fy, 1, 1, 0, 0);
- X! set_marker(canvas_win, fx - 1, fy - 1, SM_MARK, SM_MARK, 0, 0);
- X }
- X }
- X
- X***************
- X*** 430,439 ****
- X for (p = p->next; p != NULL; p = p->next) {
- X x = p->x;
- X y = p->y;
- X! set_marker(canvas_win, x - 2, y - 2, 5, 5, 0, 0);
- X }
- X if (x != fx || y != fy) {
- X! set_marker(canvas_win, fx - 2, fy - 2, 5, 5, 0, 0);
- X }
- X if (s->tagged)
- X toggle_splinehighlight(s);
- X--- 430,439 ----
- X for (p = p->next; p != NULL; p = p->next) {
- X x = p->x;
- X y = p->y;
- X! set_marker(canvas_win, x - 2, y - 2, MARK_SIZ, MARK_SIZ, 0, 0);
- X }
- X if (x != fx || y != fy) {
- X! set_marker(canvas_win, fx - 2, fy - 2, MARK_SIZ, MARK_SIZ, 0, 0);
- X }
- X if (s->tagged)
- X toggle_splinehighlight(s);
- X***************
- X*** 453,462 ****
- X x = p->x;
- X y = p->y;
- X set_marker(canvas_win, x, y, 1, 1, 0, 0);
- X! set_marker(canvas_win, x - 1, y - 1, 3, 3, 0, 0);
- X }
- X if (x != fx || y != fy) {
- X set_marker(canvas_win, fx, fy, 1, 1, 0, 0);
- X! set_marker(canvas_win, fx - 1, fy - 1, 3, 3, 0, 0);
- X }
- X }
- X--- 453,462 ----
- X x = p->x;
- X y = p->y;
- X set_marker(canvas_win, x, y, 1, 1, 0, 0);
- X! set_marker(canvas_win, x - 1, y - 1, SM_MARK, SM_MARK, 0, 0);
- X }
- X if (x != fx || y != fy) {
- X set_marker(canvas_win, fx, fy, 1, 1, 0, 0);
- X! set_marker(canvas_win, fx - 1, fy - 1, SM_MARK, SM_MARK, 0, 0);
- X }
- X }
- Xdiff -rc xfig.2.1.7a/u_print.c xfig.2.1.8/u_print.c
- X*** xfig.2.1.7a/u_print.c Tue Mar 23 10:47:40 1993
- X--- xfig.2.1.8/u_print.c Tue Aug 31 13:37:19 1993
- X***************
- X*** 68,74 ****
- X
- X
- X if (emptyname(printer)) { /* send to default printer */
- X! #if defined(SYSV) || defined(SVR4)
- X sprintf(syspr, "lp %s -oPS", params);
- X #else
- X sprintf(syspr, "lpr %s -J %s", params, shell_protect_string(cur_filename));
- X--- 68,74 ----
- X
- X
- X if (emptyname(printer)) { /* send to default printer */
- X! #if (defined(SYSV) || defined(SVR4)) && !defined(BSDLPR)
- X sprintf(syspr, "lp %s -oPS", params);
- X #else
- X sprintf(syspr, "lpr %s -J %s", params, shell_protect_string(cur_filename));
- X***************
- X*** 76,82 ****
- X put_msg("Printing figure on default printer in %s mode ... ",
- X print_landscape ? "LANDSCAPE" : "PORTRAIT");
- X } else {
- X! #if defined(SYSV) || defined(SVR4)
- X sprintf(syspr, "lp %s -d%s -oPS", params, printer);
- X #else
- X sprintf(syspr, "lpr %s -J %s -P%s", params, shell_protect_string(cur_filename),
- X--- 76,82 ----
- X put_msg("Printing figure on default printer in %s mode ... ",
- X print_landscape ? "LANDSCAPE" : "PORTRAIT");
- X } else {
- X! #if (defined(SYSV) || defined(SVR4)) && !defined(BSDLPR)
- X sprintf(syspr, "lp %s -d%s -oPS", params, printer);
- X #else
- X sprintf(syspr, "lpr %s -J %s -P%s", params, shell_protect_string(cur_filename),
- X***************
- X*** 111,117 ****
- X char tmp_name[PATH_MAX];
- X char tmp_fig_file[32];
- X char *outfile;
- X! int tlen, status;
- X
- X /* if file exists, ask if ok */
- X if (!ok_to_write(file, "EXPORT"))
- X--- 111,117 ----
- X char tmp_name[PATH_MAX];
- X char tmp_fig_file[32];
- X char *outfile;
- X! int tlen;
- X
- X /* if file exists, ask if ok */
- X if (!ok_to_write(file, "EXPORT"))
- Xdiff -rc xfig.2.1.7a/u_redraw.c xfig.2.1.8/u_redraw.c
- X*** xfig.2.1.7a/u_redraw.c Wed Jan 6 16:13:20 1993
- X--- xfig.2.1.8/u_redraw.c Wed May 12 11:45:58 1993
- X***************
- X*** 520,531 ****
- X int xmin, ymin, xmax, ymax;
- X int dum;
- X
- X! if (appres.textoutline) {
- X! text_bound_both(t, &xmin, &ymin, &xmax, &ymax,
- X! &dum,&dum,&dum,&dum,&dum,&dum,&dum,&dum);
- X! } else {
- X! text_bound(t, &xmin, &ymin, &xmax, &ymax);
- X! }
- X redisplay_zoomed_region(xmin, ymin, xmax, ymax);
- X }
- X
- X--- 520,527 ----
- X int xmin, ymin, xmax, ymax;
- X int dum;
- X
- END_OF_FILE
- if test 32473 -ne `wc -c <'xfig.05'`; then
- echo shar: \"'xfig.05'\" unpacked with wrong size!
- fi
- # end of 'xfig.05'
- fi
- echo shar: End of archive 4 \(of 16\).
- cp /dev/null ark4isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 16 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- echo Creating merged patch file xfig.p2
- cat xfig.[01][0-9] > xfig.p2
- rm -f xfig.[01][0-9]
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
- --
- // chris@Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! | sources-x@sterling.com
- "It's intuitively obvious to the |
- most casual observer..." | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
-