home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume21 / xfig / patch02g < prev    next >
Encoding:
Text File  |  1993-10-21  |  33.5 KB  |  1,062 lines

  1. Newsgroups: comp.sources.x
  2. From: envbvs@epb12.lbl.gov (Brian V. Smith)
  3. Subject: v21i027:  xfig - Draw amd manipulate objects in an X-Window, Patch02g/16
  4. Message-ID: <1993Oct21.185833.7050@sparky.sterling.com>
  5. X-Md4-Signature: c37bf795d3adacd9ab16bf658236a215
  6. Sender: chris@sparky.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Thu, 21 Oct 1993 18:58:33 GMT
  9. Approved: chris@sterling.com
  10.  
  11. Submitted-by: envbvs@epb12.lbl.gov (Brian V. Smith)
  12. Posting-number: Volume 21, Issue 27
  13. Archive-name: xfig/patch02g
  14. Environment: patch, X11, xfig
  15. Patch-To: xfig: Volume 19, Issue 113-139
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  xfig.04
  22. # Wrapped by chris@sparky on Thu Oct 21 13:40:06 1993
  23. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 7 (of 16)."'
  26. if test -f 'xfig.04' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'xfig.04'\"
  28. else
  29.   echo shar: Extracting \"'xfig.04'\" \(31142 characters\)
  30.   sed "s/^X//" >'xfig.04' <<'END_OF_FILE'
  31. X  {
  32. X!     if (path == NULL || *path == '\0') {
  33. X      *cur_dir = '\0';
  34. X      return (0);
  35. X      }
  36. X***************
  37. X*** 107,113 ****
  38. X      put_msg("%s", direct);    /* err msg is in directory */
  39. X  #endif
  40. X      *direct = '\0';
  41. X!     return NULL;
  42. X      }
  43. X      return 1;
  44. X  }
  45. X--- 107,113 ----
  46. X      put_msg("%s", direct);    /* err msg is in directory */
  47. X  #endif
  48. X      *direct = '\0';
  49. X!     return 0;
  50. X      }
  51. X      return 1;
  52. X  }
  53. X***************
  54. X*** 142,148 ****
  55. X          } else {
  56. X          if (warnexist) {
  57. X              sprintf(string, "\"%s\" already exists.\nDo you want to overwrite it?", file_name);
  58. X!             if (!popup_query(QUERY_YES, string)) {
  59. X              put_msg("%s cancelled", op_name);
  60. X              return (0);
  61. X              }
  62. X--- 142,148 ----
  63. X          } else {
  64. X          if (warnexist) {
  65. X              sprintf(string, "\"%s\" already exists.\nDo you want to overwrite it?", file_name);
  66. X!             if (!popup_query(QUERY_YESCAN, string)) {
  67. X              put_msg("%s cancelled", op_name);
  68. X              return (0);
  69. X              }
  70. X***************
  71. X*** 162,165 ****
  72. X--- 162,179 ----
  73. X      }
  74. X  
  75. X      return (1);
  76. X+ }
  77. X+ 
  78. X+ char *
  79. X+ basename(filename)
  80. X+     char       *filename;
  81. X+ {
  82. X+     char       *p;
  83. X+     if (filename == NULL || *filename == '\0')
  84. X+     return NULL;
  85. X+     if (p=strrchr(filename,'/')) {
  86. X+     return ++p;
  87. X+     } else {
  88. X+     return filename;
  89. X+     }
  90. X  }
  91. Xdiff -rc xfig.2.1.7a/f_xbitmap.c xfig.2.1.8/f_xbitmap.c
  92. X*** xfig.2.1.7a/f_xbitmap.c    Thu Feb 25 12:03:20 1993
  93. X--- xfig.2.1.8/f_xbitmap.c    Tue Aug 10 13:43:33 1993
  94. X***************
  95. X*** 17,22 ****
  96. X--- 17,23 ----
  97. X  #include "paintop.h"
  98. X  #include "w_setup.h"
  99. X  #include "w_drawprim.h"
  100. X+ #include "w_zoom.h"
  101. X  
  102. X  static int    create_n_write_bitmap();
  103. X  
  104. X***************
  105. X*** 47,52 ****
  106. X--- 48,57 ----
  107. X      Pixmap        largepm, bitmap;
  108. X      extern F_compound objects;
  109. X      int            i;
  110. X+     float        savezoom;
  111. X+     int            savexoff, saveyoff;
  112. X+     int            status;
  113. X+     Boolean        zoomchanged;
  114. X      GC            xgc, gc_bitmap;
  115. X  
  116. X      /* this may take a while */
  117. X***************
  118. X*** 54,62 ****
  119. X--- 59,81 ----
  120. X      put_msg("Capturing canvas image...");
  121. X      app_flush();
  122. X  
  123. X+     /* set the zoomscale to 1 and offset to origin */
  124. X+     zoomchanged = (zoomscale != 1.0);
  125. X+     savezoom = zoomscale;
  126. X+     savexoff = zoomxoff;
  127. X+     saveyoff = zoomyoff;
  128. X+     zoomscale = 1.0;
  129. X+     zoomxoff = zoomyoff = 0;
  130. X+     /* resize texts back to zoomscale 1 if necessary */
  131. X+     if (zoomchanged)
  132. X+     reload_text_fstructs();
  133. X+ 
  134. X      /* Assume that there is at least one object */
  135. X      compound_bound(&objects, &xmin, &ymin, &xmax, &ymax);
  136. X  
  137. X+     /* set the clipping to include ALL objects */
  138. X+     set_clip_window(xmin, ymin, xmax, ymax);
  139. X+ 
  140. X      if (appres.DEBUG) {
  141. X      elastic_box(xmin, ymin, xmax, ymax);
  142. X      }
  143. X***************
  144. X*** 65,74 ****
  145. X      xmin = 0;
  146. X      if ((ymin -= 10) < 0)
  147. X      ymin = 0;
  148. X!     if ((xmax += 10) > CANVAS_WD)
  149. X!     xmax = CANVAS_WD;
  150. X!     if ((ymax += 10) > CANVAS_HT)
  151. X!     ymax = CANVAS_HT;
  152. X  
  153. X      width = xmax - xmin + 1;
  154. X      height = ymax - ymin + 1;
  155. X--- 84,91 ----
  156. X      xmin = 0;
  157. X      if ((ymin -= 10) < 0)
  158. X      ymin = 0;
  159. X!     xmax += 10;
  160. X!     ymax += 10;
  161. X  
  162. X      width = xmax - xmin + 1;
  163. X      height = ymax - ymin + 1;
  164. X***************
  165. X*** 149,165 ****
  166. X      if (XWriteBitmapFile(tool_d, filename, bitmap, width, height, -1, -1)
  167. X      != BitmapSuccess) {
  168. X      put_msg("Couldn't write bitmap file");
  169. X!     XFreePixmap(tool_d, largepm);
  170. X!     XFreePixmap(tool_d, bitmap);
  171. X!     /* all done */
  172. X!     reset_cursor();
  173. X!     return (1);
  174. X      } else {
  175. X      put_msg("Bitmap written to \"%s\"", filename);
  176. X!     XFreePixmap(tool_d, largepm);
  177. X!     XFreePixmap(tool_d, bitmap);
  178. X!     /* all done */
  179. X!     reset_cursor();
  180. X!     return (0);
  181. X      }
  182. X  }
  183. X--- 166,187 ----
  184. X      if (XWriteBitmapFile(tool_d, filename, bitmap, width, height, -1, -1)
  185. X      != BitmapSuccess) {
  186. X      put_msg("Couldn't write bitmap file");
  187. X!     status = 1;
  188. X      } else {
  189. X      put_msg("Bitmap written to \"%s\"", filename);
  190. X!     status = 0;
  191. X      }
  192. X+     XFreePixmap(tool_d, largepm);
  193. X+     XFreePixmap(tool_d, bitmap);
  194. X+     reset_cursor();
  195. X+     /* restore the zoom */
  196. X+     zoomscale = savezoom;
  197. X+     zoomxoff = savexoff;
  198. X+     zoomyoff = saveyoff;
  199. X+     /* resize texts back to original if necessary */
  200. X+     if (zoomchanged)
  201. X+     reload_text_fstructs();
  202. X+     /* reset the clipping to the canvas */
  203. X+     reset_clip_window();
  204. X+     return (status);
  205. X  }
  206. Xdiff -rc xfig.2.1.7a/fig.h xfig.2.1.8/fig.h
  207. X*** xfig.2.1.7a/fig.h    Tue Apr 20 10:05:25 1993
  208. X--- xfig.2.1.8/fig.h    Tue Jul  6 08:41:06 1993
  209. X***************
  210. X*** 174,190 ****
  211. X--- 174,202 ----
  212. X  
  213. X  #ifndef X_NOT_STDC_ENV
  214. X  #include <string.h>
  215. X+ #ifndef index
  216. X  #define index strchr
  217. X+ #endif
  218. X+ #ifndef rindex
  219. X  #define rindex strrchr
  220. X+ #endif
  221. X  #else  /* X_NOT_STDC_ENV IS defined */
  222. X  #ifdef SYSV
  223. X  #include <string.h>
  224. X+ #ifndef index
  225. X  #define index strchr
  226. X+ #endif
  227. X+ #ifndef rindex
  228. X  #define rindex strrchr
  229. X+ #endif
  230. X  #else  /* NOT SYSV */
  231. X  #include <strings.h>
  232. X+ #ifndef strchr
  233. X  #define strchr index
  234. X+ #endif
  235. X+ #ifndef strrchr
  236. X  #define strrchr rindex
  237. X+ #endif
  238. X  #endif  /* SYSV */
  239. X  #endif  /* X_NOT_STDC_ENV */
  240. X  
  241. X***************
  242. X*** 228,234 ****
  243. X  #endif /* __STDC__ */
  244. X  #else  /* NOT defined(SYS) && defined(SYSV386) */
  245. X  #ifdef X_NOT_STDC_ENV
  246. X! #if defined(sun) && !defined(sparc) || defined(titan)
  247. X  extern double atof();
  248. X  extern char *getenv();
  249. X  #endif /* (sun) !(sparc) (titan) */
  250. X--- 240,247 ----
  251. X  #endif /* __STDC__ */
  252. X  #else  /* NOT defined(SYS) && defined(SYSV386) */
  253. X  #ifdef X_NOT_STDC_ENV
  254. X! #if defined(ultrix) || defined(sun) && !defined(sparc) || defined(titan) || \
  255. X!     (defined(ibm032) && !defined(_AIX))
  256. X  extern double atof();
  257. X  extern char *getenv();
  258. X  #endif /* (sun) !(sparc) (titan) */
  259. Xdiff -rc xfig.2.1.7a/main.c xfig.2.1.8/main.c
  260. X*** xfig.2.1.7a/main.c    Wed Apr 28 15:38:38 1993
  261. X--- xfig.2.1.8/main.c    Tue Aug 31 10:06:02 1993
  262. X***************
  263. X*** 41,47 ****
  264. X  Pixmap        fig_icon;
  265. X  
  266. X  static char    tool_name[100];
  267. X- static        sigwinched();
  268. X  
  269. X  /************** FIG options ******************/
  270. X  
  271. X--- 41,46 ----
  272. X***************
  273. X*** 49,56 ****
  274. X  
  275. X  static Boolean    true = True;
  276. X  static Boolean    false = False;
  277. X! static int    zero = 0;
  278. X! static float    one = 1.0;
  279. X  
  280. X  /* actions so that we may install accelerators at the top level */
  281. X  static XtActionsRec    main_actions[] =
  282. X--- 48,56 ----
  283. X  
  284. X  static Boolean    true = True;
  285. X  static Boolean    false = False;
  286. X! static int    Izero = 0;
  287. X! static float    Fone = 1.0;
  288. X! static int    Itwo = 2;
  289. X  
  290. X  /* actions so that we may install accelerators at the top level */
  291. X  static XtActionsRec    main_actions[] =
  292. X***************
  293. X*** 80,88 ****
  294. X      {"debug", "Debug", XtRBoolean, sizeof(Boolean),
  295. X      XtOffset(appresPtr, DEBUG), XtRBoolean, (caddr_t) & false},
  296. X      {"pwidth", XtCWidth, XtRFloat, sizeof(float),
  297. X!     XtOffset(appresPtr, tmp_width), XtRInt, (caddr_t) & zero},
  298. X      {"pheight", XtCHeight, XtRFloat, sizeof(float),
  299. X!     XtOffset(appresPtr, tmp_height), XtRInt, (caddr_t) & zero},
  300. X      {XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof(Boolean),
  301. X      XtOffset(appresPtr, INVERSE), XtRBoolean, (caddr_t) & false},
  302. X      {"trackCursor", "Track", XtRBoolean, sizeof(Boolean),
  303. X--- 80,88 ----
  304. X      {"debug", "Debug", XtRBoolean, sizeof(Boolean),
  305. X      XtOffset(appresPtr, DEBUG), XtRBoolean, (caddr_t) & false},
  306. X      {"pwidth", XtCWidth, XtRFloat, sizeof(float),
  307. X!     XtOffset(appresPtr, tmp_width), XtRInt, (caddr_t) & Izero},
  308. X      {"pheight", XtCHeight, XtRFloat, sizeof(float),
  309. X!     XtOffset(appresPtr, tmp_height), XtRInt, (caddr_t) & Izero},
  310. X      {XtNreverseVideo, XtCReverseVideo, XtRBoolean, sizeof(Boolean),
  311. X      XtOffset(appresPtr, INVERSE), XtRBoolean, (caddr_t) & false},
  312. X      {"trackCursor", "Track", XtRBoolean, sizeof(Boolean),
  313. X***************
  314. X*** 99,114 ****
  315. X      XtOffset(appresPtr, startlatexFont), XtRString, (caddr_t) NULL},
  316. X      {"startpsFont", "StartpsFont", XtRString, sizeof(char *),
  317. X      XtOffset(appresPtr, startpsFont), XtRString, (caddr_t) NULL},
  318. X!     {"startfontsize", "StartFontSize", XtRInt, sizeof(int),
  319. X!     XtOffset(appresPtr, startfontsize), XtRInt, (caddr_t) & zero},
  320. X      {"internalborderwidth", "InternalBorderWidth", XtRInt, sizeof(int),
  321. X!     XtOffset(appresPtr, internalborderwidth), XtRInt, (caddr_t) & zero},
  322. X      {"latexfonts", "Latexfonts", XtRBoolean, sizeof(Boolean),
  323. X      XtOffset(appresPtr, latexfonts), XtRBoolean, (caddr_t) & false},
  324. X      {"specialtext", "SpecialText", XtRBoolean, sizeof(Boolean),
  325. X      XtOffset(appresPtr, specialtext), XtRBoolean, (caddr_t) & false},
  326. X      {"scalablefonts", "ScalableFonts", XtRBoolean, sizeof(Boolean),
  327. X!     XtOffset(appresPtr, SCALABLEFONTS), XtRBoolean, (caddr_t) & false},
  328. X      {"color0", "Color0", XtRPixel, sizeof(Pixel),
  329. X      XtOffset(appresPtr, color[0]), XtRString, (caddr_t) "black"},
  330. X      {"color1", "Color1", XtRPixel, sizeof(Pixel),
  331. X--- 99,114 ----
  332. X      XtOffset(appresPtr, startlatexFont), XtRString, (caddr_t) NULL},
  333. X      {"startpsFont", "StartpsFont", XtRString, sizeof(char *),
  334. X      XtOffset(appresPtr, startpsFont), XtRString, (caddr_t) NULL},
  335. X!     {"startfontsize", "StartFontSize", XtRFloat, sizeof(float),
  336. X!     XtOffset(appresPtr, startfontsize), XtRInt, (caddr_t) & Izero},
  337. X      {"internalborderwidth", "InternalBorderWidth", XtRInt, sizeof(int),
  338. X!     XtOffset(appresPtr, internalborderwidth), XtRInt, (caddr_t) & Izero},
  339. X      {"latexfonts", "Latexfonts", XtRBoolean, sizeof(Boolean),
  340. X      XtOffset(appresPtr, latexfonts), XtRBoolean, (caddr_t) & false},
  341. X      {"specialtext", "SpecialText", XtRBoolean, sizeof(Boolean),
  342. X      XtOffset(appresPtr, specialtext), XtRBoolean, (caddr_t) & false},
  343. X      {"scalablefonts", "ScalableFonts", XtRBoolean, sizeof(Boolean),
  344. X!     XtOffset(appresPtr, SCALABLEFONTS), XtRBoolean, (caddr_t) & true},
  345. X      {"color0", "Color0", XtRPixel, sizeof(Pixel),
  346. X      XtOffset(appresPtr, color[0]), XtRString, (caddr_t) "black"},
  347. X      {"color1", "Color1", XtRPixel, sizeof(Pixel),
  348. X***************
  349. X*** 125,130 ****
  350. X--- 125,149 ----
  351. X      XtOffset(appresPtr, color[6]), XtRString, (caddr_t) "yellow"},
  352. X      {"color7", "Color7", XtRPixel, sizeof(Pixel),
  353. X      XtOffset(appresPtr, color[7]), XtRString, (caddr_t) "white"},
  354. X+     /* don't get any ideas about using the following colors yet */
  355. X+     /* the protocol needs modification before we can do that */
  356. X+     {"color8", "Color8", XtRPixel, sizeof(Pixel),
  357. X+     XtOffset(appresPtr, color[8]), XtRString, (caddr_t) "lightblue"},
  358. X+     {"color9", "Color9", XtRPixel, sizeof(Pixel),
  359. X+     XtOffset(appresPtr, color[9]), XtRString, (caddr_t) "darkgreen"},
  360. X+     {"color10", "Color10", XtRPixel, sizeof(Pixel),
  361. X+     XtOffset(appresPtr, color[10]), XtRString, (caddr_t) "brown"},
  362. X+     {"color11", "Color11", XtRPixel, sizeof(Pixel),
  363. X+     XtOffset(appresPtr, color[11]), XtRString, (caddr_t) "orange"},
  364. X+     {"color12", "Color12", XtRPixel, sizeof(Pixel),
  365. X+     XtOffset(appresPtr, color[12]), XtRString, (caddr_t) "purple"},
  366. X+     {"color13", "Color13", XtRPixel, sizeof(Pixel),
  367. X+     XtOffset(appresPtr, color[13]), XtRString, (caddr_t) "pink"},
  368. X+     {"color14", "Color14", XtRPixel, sizeof(Pixel),
  369. X+     XtOffset(appresPtr, color[14]), XtRString, (caddr_t) "firebrick"},
  370. X+     {"color15", "Color15", XtRPixel, sizeof(Pixel),
  371. X+     XtOffset(appresPtr, color[15]), XtRString, (caddr_t) "gold"},
  372. X+ 
  373. X      {"monochrome", "Monochrome", XtRBoolean, sizeof(Boolean),
  374. X      XtOffset(appresPtr, monochrome), XtRBoolean, (caddr_t) & false},
  375. X      {"latexfonts", "Latexfonts", XtRBoolean, sizeof(Boolean),
  376. X***************
  377. X*** 138,146 ****
  378. X      {"textoutline", "TextOutline", XtRBoolean, sizeof(Boolean),
  379. X      XtOffset(appresPtr, textoutline), XtRBoolean, (caddr_t) & false},
  380. X      {"userscale", "UserScale", XtRFloat, sizeof(float),
  381. X!     XtOffset(appresPtr, user_scale), XtRFloat, (caddr_t) & one},
  382. X      {"userunit", "UserUnit", XtRString, sizeof(char *),
  383. X      XtOffset(appresPtr, user_unit), XtRString, (caddr_t) ""},
  384. X  };
  385. X  
  386. X  static XrmOptionDescRec options[] =
  387. X--- 157,167 ----
  388. X      {"textoutline", "TextOutline", XtRBoolean, sizeof(Boolean),
  389. X      XtOffset(appresPtr, textoutline), XtRBoolean, (caddr_t) & false},
  390. X      {"userscale", "UserScale", XtRFloat, sizeof(float),
  391. X!     XtOffset(appresPtr, user_scale), XtRFloat, (caddr_t) & Fone},
  392. X      {"userunit", "UserUnit", XtRString, sizeof(char *),
  393. X      XtOffset(appresPtr, user_unit), XtRString, (caddr_t) ""},
  394. X+     {"but_per_row", "But_per_row", XtRInt, sizeof(int),
  395. X+     XtOffset(appresPtr, but_per_row), XtRInt, (caddr_t) & Itwo},
  396. X  };
  397. X  
  398. X  static XrmOptionDescRec options[] =
  399. X***************
  400. X*** 183,188 ****
  401. X--- 204,210 ----
  402. X      {"-textoutline", ".textoutline", XrmoptionNoArg, "True"},
  403. X      {"-userscale", ".userscale", XrmoptionSepArg, 0},
  404. X      {"-userunit", ".userunit", XrmoptionSepArg, 0},
  405. X+     {"-but_per_row", ".but_per_row", XrmoptionSepArg, 0},
  406. X  };
  407. X  
  408. X  Atom wm_delete_window;
  409. X***************
  410. X*** 236,241 ****
  411. X--- 258,264 ----
  412. X      char        i;
  413. X      char       *userhome;
  414. X      Dimension        w, h;
  415. X+     XGCValues        gcv;
  416. X  
  417. X      DeclareArgs(5);
  418. X  
  419. X***************
  420. X*** 246,252 ****
  421. X      if ((TMPDIR = getenv("XFIGTMPDIR"))==NULL)
  422. X      TMPDIR = "/tmp";
  423. X  
  424. X!     (void) sprintf(tool_name, " XFIG %s(.%s) (Protocol %s)",
  425. X             FIG_VERSION, PATCHLEVEL, PROTOCOL_VERSION);
  426. X      (void) strcat(file_header, PROTOCOL_VERSION);
  427. X      tool = XtAppInitialize(&tool_app, (String) "Fig", (XrmOptionDescList) options,
  428. X--- 269,275 ----
  429. X      if ((TMPDIR = getenv("XFIGTMPDIR"))==NULL)
  430. X      TMPDIR = "/tmp";
  431. X  
  432. X!     (void) sprintf(tool_name, " XFIG %s patchlevel %s (Protocol %s)",
  433. X             FIG_VERSION, PATCHLEVEL, PROTOCOL_VERSION);
  434. X      (void) strcat(file_header, PROTOCOL_VERSION);
  435. X      tool = XtAppInitialize(&tool_app, (String) "Fig", (XrmOptionDescList) options,
  436. X***************
  437. X*** 348,361 ****
  438. X      init_font();
  439. X  
  440. X      gc = DefaultGC(tool_d, tool_sn);
  441. X!     bold_gc = DefaultGC(tool_d, tool_sn);
  442. X!     button_gc = DefaultGC(tool_d, tool_sn);
  443. X! 
  444. X!     /* set the roman and bold fonts for the message windows */
  445. X      XSetFont(tool_d, gc, roman_font->fid);
  446. X-     XSetFont(tool_d, bold_gc, bold_font->fid);
  447. X-     XSetFont(tool_d, button_gc, button_font->fid);
  448. X  
  449. X      /*
  450. X       * check if the NUMCOLORS drawing colors could be allocated and have
  451. X       * different palette entries
  452. X--- 371,385 ----
  453. X      init_font();
  454. X  
  455. X      gc = DefaultGC(tool_d, tool_sn);
  456. X!     /* set the roman font for the message window */
  457. X      XSetFont(tool_d, gc, roman_font->fid);
  458. X  
  459. X+     /* make a gc for the command buttons */
  460. X+     gcv.font = button_font->fid;
  461. X+     button_gc = XCreateGC(tool_d, DefaultRootWindow(tool_d), GCFont, &gcv);
  462. X+     /* copy the other components from the default gc to the button_gc */
  463. X+     XCopyGC(tool_d, gc, ~GCFont, button_gc);
  464. X+ 
  465. X      /*
  466. X       * check if the NUMCOLORS drawing colors could be allocated and have
  467. X       * different palette entries
  468. X***************
  469. X*** 378,389 ****
  470. X      cur_ps_font = psfontnum (appres.startpsFont);
  471. X  
  472. X      if (INTERNAL_BW == 0)
  473. X!     INTERNAL_BW = (int) appres.internalborderwidth;
  474. X      if (INTERNAL_BW <= 0)
  475. X      INTERNAL_BW = DEF_INTERNAL_BW;
  476. X  
  477. X!     SW_PER_ROW = SW_PER_ROW_PORT;
  478. X!     SW_PER_COL = SW_PER_COL_PORT;
  479. X      init_canv_wd = appres.tmp_width *
  480. X      (appres.INCHES ? PIX_PER_INCH : PIX_PER_CM);
  481. X      init_canv_ht = appres.tmp_height *
  482. X--- 402,418 ----
  483. X      cur_ps_font = psfontnum (appres.startpsFont);
  484. X  
  485. X      if (INTERNAL_BW == 0)
  486. X!     INTERNAL_BW = appres.internalborderwidth;
  487. X      if (INTERNAL_BW <= 0)
  488. X      INTERNAL_BW = DEF_INTERNAL_BW;
  489. X  
  490. X!     /* get the desired number of buttons per row for the mode panel */
  491. X!     SW_PER_ROW = appres.but_per_row;
  492. X!     if (SW_PER_ROW <= 0)
  493. X!     SW_PER_ROW = DEF_SW_PER_ROW;
  494. X!     else if (SW_PER_ROW > 6)
  495. X!     SW_PER_ROW = 6;
  496. X! 
  497. X      init_canv_wd = appres.tmp_width *
  498. X      (appres.INCHES ? PIX_PER_INCH : PIX_PER_CM);
  499. X      init_canv_ht = appres.tmp_height *
  500. X***************
  501. X*** 397,407 ****
  502. X      init_canv_ht = appres.landscape ? DEF_CANVAS_HT_LAND :
  503. X          DEF_CANVAS_HT_PORT;
  504. X  
  505. X-     if ((init_canv_ht < DEF_CANVAS_HT_PORT) ||
  506. X-     (HeightOfScreen(tool_s) < DEF_CANVAS_HT_PORT)) {
  507. X-     SW_PER_ROW = SW_PER_ROW_LAND;
  508. X-     SW_PER_COL = SW_PER_COL_LAND;
  509. X-     }
  510. X      setup_sizes(init_canv_wd, init_canv_ht);
  511. X      (void) init_cmd_panel(form);
  512. X      (void) init_msg(form,filename);
  513. X--- 426,431 ----
  514. X***************
  515. X*** 529,535 ****
  516. X      XSetIOErrorHandler((XIOErrorHandler) X_error_handler);
  517. X      (void) signal(SIGHUP, error_handler);
  518. X      (void) signal(SIGFPE, error_handler);
  519. X! #ifndef NO_SIBGUS
  520. X      (void) signal(SIGBUS, error_handler);
  521. X  #endif
  522. X      (void) signal(SIGSEGV, error_handler);
  523. X--- 553,559 ----
  524. X      XSetIOErrorHandler((XIOErrorHandler) X_error_handler);
  525. X      (void) signal(SIGHUP, error_handler);
  526. X      (void) signal(SIGFPE, error_handler);
  527. X! #ifdef SIGBUS
  528. X      (void) signal(SIGBUS, error_handler);
  529. X  #endif
  530. X      (void) signal(SIGSEGV, error_handler);
  531. X***************
  532. X*** 768,774 ****
  533. X      cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
  534. X      cutlim = cutoff % (unsigned long)base;
  535. X      cutoff /= (unsigned long)base;
  536. X!     for (acc = 0, any = 0; c = *s++) {
  537. X          if (isdigit(c))
  538. X              c -= '0';
  539. X          else if (isalpha(c))
  540. X--- 792,798 ----
  541. X      cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX;
  542. X      cutlim = cutoff % (unsigned long)base;
  543. X      cutoff /= (unsigned long)base;
  544. X!     for (acc = 0, any = 0; c = *s++; ) {
  545. X          if (isdigit(c))
  546. X              c -= '0';
  547. X          else if (isalpha(c))
  548. Xdiff -rc xfig.2.1.7a/mode.c xfig.2.1.8/mode.c
  549. X*** xfig.2.1.7a/mode.c    Mon Mar 22 14:15:21 1993
  550. X--- xfig.2.1.8/mode.c    Fri Jul  2 11:04:23 1993
  551. X***************
  552. X*** 17,24 ****
  553. X  #include "w_indpanel.h"
  554. X  
  555. X  int        cur_mode = F_NULL;
  556. X! int        cur_halign = NONE;
  557. X! int        cur_valign = NONE;
  558. X  int        manhattan_mode = 0;
  559. X  int        mountain_mode = 0;
  560. X  int        latexline_mode = 0;
  561. X--- 17,24 ----
  562. X  #include "w_indpanel.h"
  563. X  
  564. X  int        cur_mode = F_NULL;
  565. X! int        cur_halign = ALIGN_NONE;
  566. X! int        cur_valign = ALIGN_NONE;
  567. X  int        manhattan_mode = 0;
  568. X  int        mountain_mode = 0;
  569. X  int        latexline_mode = 0;
  570. Xdiff -rc xfig.2.1.7a/mode.h xfig.2.1.8/mode.h
  571. X*** xfig.2.1.7a/mode.h    Mon Mar 22 14:16:07 1993
  572. X--- xfig.2.1.8/mode.h    Fri Jul  2 11:04:02 1993
  573. X***************
  574. X*** 55,66 ****
  575. X  extern int    cur_mode;
  576. X  
  577. X  /* alignment mode */
  578. X! #define        NONE            0
  579. X! #define        LEFT            1
  580. X! #define        TOP            1
  581. X! #define        CENTER            2
  582. X! #define        RIGHT            3
  583. X! #define        BOTTOM            3
  584. X  
  585. X  extern int    cur_halign;
  586. X  extern int    cur_valign;
  587. X--- 55,66 ----
  588. X  extern int    cur_mode;
  589. X  
  590. X  /* alignment mode */
  591. X! #define        ALIGN_NONE        0
  592. X! #define        ALIGN_LEFT        1
  593. X! #define        ALIGN_TOP        1
  594. X! #define        ALIGN_CENTER        2
  595. X! #define        ALIGN_RIGHT        3
  596. X! #define        ALIGN_BOTTOM        3
  597. X  
  598. X  extern int    cur_halign;
  599. X  extern int    cur_valign;
  600. Xdiff -rc xfig.2.1.7a/object.h xfig.2.1.8/object.h
  601. X*** xfig.2.1.7a/object.h    Thu Feb 25 11:06:28 1993
  602. X--- xfig.2.1.8/object.h    Mon Aug 23 15:26:19 1993
  603. X***************
  604. X*** 148,154 ****
  605. X  #define                    T_CENTER_JUSTIFIED    1
  606. X  #define                    T_RIGHT_JUSTIFIED    2
  607. X      int            font;
  608. X!     PIX_ROT_FONT    fontstruct;
  609. X      int            size;    /* point size */
  610. X      Color        color;
  611. X      int            depth;
  612. X--- 148,154 ----
  613. X  #define                    T_CENTER_JUSTIFIED    1
  614. X  #define                    T_RIGHT_JUSTIFIED    2
  615. X      int            font;
  616. X!     PIX_FONT        fontstruct;
  617. X      int            size;    /* point size */
  618. X      Color        color;
  619. X      int            depth;
  620. X***************
  621. X*** 170,176 ****
  622. X  }
  623. X          F_text;
  624. X  
  625. X! #define MAXFONT(T) (psfont_text(T) ? NUM_PS_FONTS : NUM_LATEX_FONTS)
  626. X  
  627. X  #define        rigid_text(t) \
  628. X              (t->flags == DEFAULT \
  629. X--- 170,176 ----
  630. X  }
  631. X          F_text;
  632. X  
  633. X! #define MAXFONT(T) (psfont_text(T) ? NUM_FONTS : NUM_LATEX_FONTS)
  634. X  
  635. X  #define        rigid_text(t) \
  636. X              (t->flags == DEFAULT \
  637. Xdiff -rc xfig.2.1.7a/paintop.h xfig.2.1.8/paintop.h
  638. X*** xfig.2.1.7a/paintop.h    Wed Dec  9 17:30:23 1992
  639. X--- xfig.2.1.8/paintop.h    Wed Jun 16 14:57:55 1993
  640. X***************
  641. X*** 21,23 ****
  642. X--- 21,27 ----
  643. X  #define UNDRAW        0
  644. X  
  645. X  #define DEFAULT_COLOR    -1
  646. X+ 
  647. X+ /* size of markers for selected objects */
  648. X+ #define    MARK_SIZ    5
  649. X+ #define SM_MARK        3
  650. Xdiff -rc xfig.2.1.7a/patchlevel.h xfig.2.1.8/patchlevel.h
  651. X*** xfig.2.1.7a/patchlevel.h    Thu Oct 21 10:22:59 1993
  652. X--- xfig.2.1.8/patchlevel.h    Fri Oct  1 13:02:29 1993
  653. X***************
  654. X*** 10,13 ****
  655. X   * any purpose.  It is provided "as is" without express or implied warranty."
  656. X   */
  657. X  
  658. X! #define PATCHLEVEL "7a"
  659. X--- 10,13 ----
  660. X   * any purpose.  It is provided "as is" without express or implied warranty."
  661. X   */
  662. X  
  663. X! #define PATCHLEVEL "8"
  664. Xdiff -rc xfig.2.1.7a/resources.c xfig.2.1.8/resources.c
  665. X*** xfig.2.1.7a/resources.c    Thu Feb 11 14:22:12 1993
  666. X--- xfig.2.1.8/resources.c    Tue Aug 17 08:42:28 1993
  667. X***************
  668. X*** 15,20 ****
  669. X--- 15,24 ----
  670. X  
  671. X  char           *colorNames[] = {"Default", "Black", "Blue", "Green", "Cyan",
  672. X                  "Red", "Magenta", "Yellow", "White"};
  673. X+                 /**** for future expansion 
  674. X+                 "Lgtblue", "Dkgreen", "Brown", "Orange",
  675. X+                 "Purple", "Pink", "Brick", "Gold"};
  676. X+                 ****/
  677. X  Boolean        all_colors_available;
  678. X  
  679. X  appresStruct    appres;
  680. X***************
  681. X*** 40,46 ****
  682. X  Screen           *tool_s;
  683. X  int        tool_sn;
  684. X  
  685. X! GC        gc, bold_gc, button_gc, ind_button_gc, color_gc, mouse_button_gc,
  686. X          blank_gc, ind_blank_gc, mouse_blank_gc, gccache[NUMOPS],
  687. X          fillgc, fill_gc[NUMFILLPATS],    /* fill style gc's */
  688. X          black_fill_gc[NUMFILLPATS],
  689. X--- 44,50 ----
  690. X  Screen           *tool_s;
  691. X  int        tool_sn;
  692. X  
  693. X! GC        gc, button_gc, ind_button_gc, color_gc, mouse_button_gc,
  694. X          blank_gc, ind_blank_gc, mouse_blank_gc, gccache[NUMOPS],
  695. X          fillgc, fill_gc[NUMFILLPATS],    /* fill style gc's */
  696. X          black_fill_gc[NUMFILLPATS],
  697. Xdiff -rc xfig.2.1.7a/resources.h xfig.2.1.8/resources.h
  698. X*** xfig.2.1.7a/resources.h    Tue Feb 16 09:11:39 1993
  699. X--- xfig.2.1.8/resources.h    Mon Aug 23 10:06:51 1993
  700. X***************
  701. X*** 11,17 ****
  702. X   */
  703. X  
  704. X  #include "paintop.h"
  705. X- #include "w_rottext.h"
  706. X  
  707. X  typedef struct {
  708. X      unsigned int    x, y, z;
  709. X--- 11,16 ----
  710. X***************
  711. X*** 66,71 ****
  712. X--- 65,71 ----
  713. X      float        tmp_height;
  714. X      float        startfontsize;    /* ges 6 Feb 91 */
  715. X      int            internalborderwidth;
  716. X+     int            but_per_row;    /* number of buttons wide for the mode panel */
  717. X      Pixel        color[NUMCOLORS];
  718. X      Boolean        monochrome;
  719. X      char       *keyFile;
  720. X***************
  721. X*** 107,113 ****
  722. X  typedef XImage    PIXRECTREC;
  723. X  typedef XImage *PIXRECT;
  724. X  typedef XFontStruct *PIX_FONT;
  725. X- typedef XRotFontStruct *PIX_ROT_FONT;
  726. X  typedef MprData MPR_DATA;
  727. X  typedef Widget    TOOL;
  728. X  typedef Widget    TOOLSW;
  729. X--- 107,112 ----
  730. X***************
  731. X*** 138,144 ****
  732. X  
  733. X  #define NUMFILLPATS 21
  734. X  
  735. X! extern GC    gc, bold_gc, button_gc, ind_button_gc, mouse_button_gc,
  736. X          color_gc, blank_gc, ind_blank_gc, mouse_blank_gc, gccache[NUMOPS],
  737. X          fillgc, fill_gc[NUMFILLPATS],    /* fill style gc's */
  738. X          black_fill_gc[NUMFILLPATS],
  739. X--- 137,143 ----
  740. X  
  741. X  #define NUMFILLPATS 21
  742. X  
  743. X! extern GC    gc, button_gc, ind_button_gc, mouse_button_gc,
  744. X          color_gc, blank_gc, ind_blank_gc, mouse_blank_gc, gccache[NUMOPS],
  745. X          fillgc, fill_gc[NUMFILLPATS],    /* fill style gc's */
  746. X          black_fill_gc[NUMFILLPATS],
  747. Xdiff -rc xfig.2.1.7a/u_bound.c xfig.2.1.8/u_bound.c
  748. X*** xfig.2.1.7a/u_bound.c    Wed Jan  6 17:07:24 1993
  749. X--- xfig.2.1.8/u_bound.c    Thu Jun 17 10:07:15 1993
  750. X***************
  751. X*** 14,19 ****
  752. X--- 14,20 ----
  753. X  #include "resources.h"
  754. X  #include "object.h"
  755. X  #include "mode.h"
  756. X+ #include "paintop.h"
  757. X  #include "u_bound.h"
  758. X  
  759. X  #define        Ninety_deg        M_PI_2
  760. X***************
  761. X*** 22,46 ****
  762. X  #define        Three_sixty_deg        (M_PI + M_PI)
  763. X  #define        half(z1 ,z2)        ((z1+z2)/2.0)
  764. X  
  765. X- /* macro which rounds DOWN the coordinates depending on point positioning mode */
  766. X- #define        floor_coords(x) \
  767. X-     if (cur_pointposn != P_ANY) { \
  768. X-         tmp_t = ((x) + 1) % posn_rnd[cur_pointposn]; \
  769. X-         (x) = (x) - tmp_t; \
  770. X-     }
  771. X- 
  772. X- /* macro which rounds UP the coordinates depending on point positioning mode */
  773. X- #define        ceil_coords(x) \
  774. X-     if (cur_pointposn != P_ANY) { \
  775. X-         (x) = (x) + posn_rnd[cur_pointposn]; \
  776. X-         tmp_t = (x)%posn_rnd[cur_pointposn]; \
  777. X-         (x) = (x) - tmp_t - 1; \
  778. X-     }
  779. X- 
  780. X  static void    points_bound();
  781. X  static void    int_spline_bound();
  782. X  static void    normal_spline_bound();
  783. X- static int    tmp_t;
  784. X  
  785. X  arc_bound(arc, xmin, ymin, xmax, ymax)
  786. X      F_arc       *arc;
  787. X--- 23,31 ----
  788. X***************
  789. X*** 221,228 ****
  790. X  
  791. X      for (t = compound->texts; t != NULL; t = t->next) {
  792. X      int    dum;
  793. X!     text_bound_actual(t, t->angle, &sx, &sy, &bx, &by, 
  794. X!               &dum,&dum,&dum,&dum,&dum,&dum,&dum,&dum);
  795. X      if (first) {
  796. X          first = 0;
  797. X          llx = sx;
  798. X--- 206,213 ----
  799. X  
  800. X      for (t = compound->texts; t != NULL; t = t->next) {
  801. X      int    dum;
  802. X!     text_bound(t, &sx, &sy, &bx, &by, 
  803. X!           &dum,&dum,&dum,&dum,&dum,&dum,&dum,&dum);
  804. X      if (first) {
  805. X          first = 0;
  806. X          llx = sx;
  807. X***************
  808. X*** 492,533 ****
  809. X      }
  810. X  }
  811. X  
  812. X! /* This procedure calculates the bounding box for text that is displayed
  813. X!    horizontally or vertically (all text on the canvas in otherwords)
  814. X!    Use text_bound_actual() to decide whether or not text would be off
  815. X!    the PRINTED page (if rotated) */
  816. X! 
  817. X! text_bound(t, xmin, ymin, xmax, ymax)
  818. X!     F_text       *t;
  819. X!     int           *xmin, *ymin, *xmax, *ymax;
  820. X! {
  821. X!     int            length, dx, dy, mx, my, dum;
  822. X!     double        angle;
  823. X! 
  824. X!     angle = t->angle;
  825. X!     /* fix the angle to one of four - 0, 90, 180 or 270 */
  826. X!     if (angle < M_PI_2 - 0.001)
  827. X!     angle = 0.0;
  828. X!     else if (angle < M_PI - 0.001)
  829. X!     angle = M_PI_2;
  830. X!     else if (angle < 3*M_PI_2 - 0.001)
  831. X!     angle = M_PI;
  832. X!     else
  833. X!     angle = 3*M_PI_2;
  834. X!     text_bound_actual(t, angle, xmin, ymin, xmax, ymax,
  835. X!           &dum, &dum, &dum, &dum, &dum, &dum, &dum, &dum);
  836. X! }
  837. X! 
  838. X! /* this procedure calculates the bouding box for text ASSUMING that it 
  839. X!    will be DISPLAYED rotated (if it has any rotation angle).
  840. X     The actual corners of the rectangle are returned in (rx1,ry1)...(rx4,ry4)
  841. X!    The min and max x and y are returned in (xmin, ymin) (xmax, ymax)
  842. X! */
  843. X  
  844. X! text_bound_actual(t, angle, xmin, ymin, xmax, ymax, 
  845. X            rx1, ry1, rx2, ry2, rx3, ry3, rx4, ry4)
  846. X      F_text       *t;
  847. X-     double        angle;
  848. X      int           *xmin, *ymin, *xmax, *ymax;
  849. X      int           *rx1,*ry1, *rx2,*ry2, *rx3,*ry3, *rx4,*ry4;
  850. X  {
  851. X--- 477,490 ----
  852. X      }
  853. X  }
  854. X  
  855. X! /* This procedure calculates the bounding box for text.  It returns
  856. X!    the min/max x and y coords of the enclosing HORIZONTAL rectangle.
  857. X     The actual corners of the rectangle are returned in (rx1,ry1)...(rx4,ry4)
  858. X!  */
  859. X  
  860. X! text_bound(t, xmin, ymin, xmax, ymax, 
  861. X            rx1, ry1, rx2, ry2, rx3, ry3, rx4, ry4)
  862. X      F_text       *t;
  863. X      int           *xmin, *ymin, *xmax, *ymax;
  864. X      int           *rx1,*ry1, *rx2,*ry2, *rx3,*ry3, *rx4,*ry4;
  865. X  {
  866. X***************
  867. X*** 538,545 ****
  868. X  
  869. X      l = text_length(t);
  870. X      h = t->height;
  871. X!     cost = cos((double)angle);
  872. X!     sint = sin((double)angle);
  873. X      lcost = round(l*cost);
  874. X      lsint = round(l*sint);
  875. X      hcost = round(h*cost);
  876. X--- 495,502 ----
  877. X  
  878. X      l = text_length(t);
  879. X      h = t->height;
  880. X!     cost = cos((double)t->angle);
  881. X!     sint = sin((double)t->angle);
  882. X      lcost = round(l*cost);
  883. X      lsint = round(l*sint);
  884. X      hcost = round(h*cost);
  885. X***************
  886. X*** 575,602 ****
  887. X      *rx2=x2; *ry2=y2;
  888. X      *rx3=x3; *ry3=y3;
  889. X      *rx4=x4; *ry4=y4;
  890. X- }
  891. X- 
  892. X- /* this procedure calculates the union of the two types of bounding boxes */
  893. X- /* this is usually called by the redisplay code which needs the bounding
  894. X-    rectangle if the user is displaying the textoutline */
  895. X- 
  896. X- text_bound_both(t, xmin, ymin, xmax, ymax,
  897. X-           rx1, ry1, rx2, ry2, rx3, ry3, rx4, ry4)
  898. X-     F_text      *t;
  899. X-     int          *xmin, *ymin, *xmax, *ymax;
  900. X-     int           *rx1,*ry1, *rx2,*ry2, *rx3,*ry3, *rx4,*ry4;
  901. X- {
  902. X-     int           xmin1, ymin1, xmax1, ymax1;
  903. X-     int           xmin2, ymin2, xmax2, ymax2;
  904. X-     int           dum;
  905. X-     text_bound_actual(t, t->angle, &xmin1, &ymin1, &xmax1, &ymax1, 
  906. X-           rx1, ry1, rx2, ry2, rx3, ry3, rx4, ry4);
  907. X-     text_bound(t, &xmin2, &ymin2, &xmax2, &ymax2);
  908. X-     *xmin = min2(xmin1,xmin2);
  909. X-     *xmax = max2(xmax1,xmax2);
  910. X-     *ymin = min2(ymin1,ymin2);
  911. X-     *ymax = max2(ymax1,ymax2);
  912. X  }
  913. X  
  914. X  static void
  915. X--- 532,537 ----
  916. Xdiff -rc xfig.2.1.7a/u_bound.h xfig.2.1.8/u_bound.h
  917. X*** xfig.2.1.7a/u_bound.h    Wed Dec  9 17:31:41 1992
  918. X--- xfig.2.1.8/u_bound.h    Thu Jun 17 10:08:40 1993
  919. X***************
  920. X*** 11,13 ****
  921. X--- 11,30 ----
  922. X   */
  923. X  
  924. X  extern int    overlapping();
  925. X+ 
  926. X+ /* macro which rounds DOWN the coordinates depending on point positioning mode */
  927. X+ #define        floor_coords(x) \
  928. X+     if (cur_pointposn != P_ANY) { \
  929. X+         register int tmp_t; \
  930. X+         tmp_t = ((x) + 1) % posn_rnd[cur_pointposn]; \
  931. X+         (x) = (x) - tmp_t; \
  932. X+     }
  933. X+ 
  934. X+ /* macro which rounds UP the coordinates depending on point positioning mode */
  935. X+ #define        ceil_coords(x) \
  936. X+     if (cur_pointposn != P_ANY) { \
  937. X+         register int tmp_t; \
  938. X+         (x) = (x) + posn_rnd[cur_pointposn]; \
  939. X+         tmp_t = (x)%posn_rnd[cur_pointposn]; \
  940. X+         (x) = (x) - tmp_t - 1; \
  941. X+     }
  942. Xdiff -rc xfig.2.1.7a/u_drag.c xfig.2.1.8/u_drag.c
  943. X*** xfig.2.1.7a/u_drag.c    Wed Apr 28 11:55:52 1993
  944. X--- xfig.2.1.8/u_drag.c    Mon May 24 16:50:40 1993
  945. X***************
  946. X*** 222,229 ****
  947. X      F_text       *t;
  948. X      int            x, y;
  949. X  {
  950. X!     int           cw,cw2;
  951. X!     float       angle;
  952. X  
  953. X      new_t = t;
  954. X      /* adjust in case text was off positioning grid and positioning is now on */
  955. X--- 222,228 ----
  956. X      F_text       *t;
  957. X      int            x, y;
  958. X  {
  959. X!     float       cw,cw2;
  960. X  
  961. X      new_t = t;
  962. X      /* adjust in case text was off positioning grid and positioning is now on */
  963. X***************
  964. X*** 234,260 ****
  965. X      y1off = new_t->base_y - y;
  966. X      if (t->type == T_CENTER_JUSTIFIED || t->type == T_RIGHT_JUSTIFIED) {
  967. X      txsize = pf_textwidth(t->fontstruct, strlen(t->cstring), t->cstring);
  968. X-     angle = t->angle*180.0/M_PI;
  969. X      if (t->type == T_CENTER_JUSTIFIED) {
  970. X!         cw2 = round(txsize.x/2/zoomscale);
  971. X!         if (angle < 90.0 - 0.001)
  972. X!         x1off -= cw2;
  973. X!         else if (angle < 180.0 - 0.001) 
  974. X!         y1off += cw2;
  975. X!         else if (angle < 270.0 - 0.001) 
  976. X!         x1off += cw2;
  977. X!         else 
  978. X!         y1off -= cw2;
  979. X      } else { /* T_RIGHT_JUSTIFIED */
  980. X!         cw = round(txsize.x/zoomscale);
  981. X!         if (angle < 90.0 - 0.001)
  982. X!         x1off -= cw;
  983. X!         else if (angle < 180.0 - 0.001) 
  984. X!         y1off += cw;
  985. X!         else if (angle < 270.0 - 0.001) 
  986. X!         x1off += cw;
  987. X!         else 
  988. X!         y1off -= cw;
  989. X      }
  990. X      }
  991. X      canvas_locmove_proc = moving_text;
  992. X--- 233,246 ----
  993. X      y1off = new_t->base_y - y;
  994. X      if (t->type == T_CENTER_JUSTIFIED || t->type == T_RIGHT_JUSTIFIED) {
  995. X      txsize = pf_textwidth(t->fontstruct, strlen(t->cstring), t->cstring);
  996. X      if (t->type == T_CENTER_JUSTIFIED) {
  997. X!         cw2 = txsize.x/2.0/zoomscale;
  998. X!         x1off = round(x1off - cos((double)t->angle)*cw2);
  999. X!         y1off = round(y1off + sin((double)t->angle)*cw2);
  1000. X      } else { /* T_RIGHT_JUSTIFIED */
  1001. X!         cw = 1.0*txsize.x/zoomscale;
  1002. X!         x1off = round(x1off - cos((double)t->angle)*cw);
  1003. X!         y1off = round(y1off + sin((double)t->angle)*cw);
  1004. X      }
  1005. X      }
  1006. X      canvas_locmove_proc = moving_text;
  1007. Xdiff -rc xfig.2.1.7a/u_draw.c xfig.2.1.8/u_draw.c
  1008. X*** xfig.2.1.7a/u_draw.c    Wed Apr 28 17:44:47 1993
  1009. X--- xfig.2.1.8/u_draw.c    Tue Sep 14 09:08:32 1993
  1010. X***************
  1011. X*** 24,30 ****
  1012. X  #include "w_zoom.h"
  1013. X  
  1014. X  typedef unsigned char byte;
  1015. X! extern PIX_ROT_FONT lookfont();
  1016. X  
  1017. X  /************** POLYGON/CURVE DRAWING FACILITIES ****************/
  1018. X  
  1019. X--- 24,30 ----
  1020. X  #include "w_zoom.h"
  1021. X  
  1022. X  typedef unsigned char byte;
  1023. X! extern PIX_FONT lookfont();
  1024. X  
  1025. X  /************** POLYGON/CURVE DRAWING FACILITIES ****************/
  1026. X  
  1027. X***************
  1028. X*** 71,76 ****
  1029. X--- 71,80 ----
  1030. X      }
  1031. END_OF_FILE
  1032.   if test 31142 -ne `wc -c <'xfig.04'`; then
  1033.     echo shar: \"'xfig.04'\" unpacked with wrong size!
  1034.   fi
  1035.   # end of 'xfig.04'
  1036. fi
  1037. echo shar: End of archive 7 \(of 16\).
  1038. cp /dev/null ark7isdone
  1039. MISSING=""
  1040. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do
  1041.     if test ! -f ark${I}isdone ; then
  1042.     MISSING="${MISSING} ${I}"
  1043.     fi
  1044. done
  1045. if test "${MISSING}" = "" ; then
  1046.     echo You have unpacked all 16 archives.
  1047.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1048.     echo Creating merged patch file xfig.p2
  1049.     cat xfig.[01][0-9] > xfig.p2
  1050.     rm -f xfig.[01][0-9]
  1051. else
  1052.     echo You still must unpack the following archives:
  1053.     echo "        " ${MISSING}
  1054. fi
  1055. exit 0
  1056. exit 0 # Just in case...
  1057. -- 
  1058.   // chris@Sterling.COM           | Send comp.sources.x submissions to:
  1059. \X/  Amiga - The only way to fly! |    sources-x@sterling.com
  1060.  "It's intuitively obvious to the |
  1061.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1062.