home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume19 / xfig / part07 < prev    next >
Encoding:
Text File  |  1993-05-26  |  65.5 KB  |  1,906 lines

  1. Newsgroups: comp.sources.x
  2. From: envbvs@epb9.lbl.gov (Brian V. Smith)
  3. Subject: v19i119:  xfig - Draw amd manipulate objects in an X-Window, Part07/27
  4. Message-ID: <1993May21.021333.5385@sparky.imd.sterling.com>
  5. X-Md4-Signature: 2cee93581fd2d0d2f5ceef732e45f391
  6. Sender: chris@sparky.imd.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Fri, 21 May 1993 02:13:33 GMT
  9. Approved: chris@sparky.imd.sterling.com
  10.  
  11. Submitted-by: envbvs@epb9.lbl.gov (Brian V. Smith)
  12. Posting-number: Volume 19, Issue 119
  13. Archive-name: xfig/part07
  14. Environment: X11
  15. Supersedes: xfig: Volume 16, Issue 6-30,39
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 7 (of 27)."
  24. # Contents:  Doc/FORMAT2.1 Examples/houseD.fig.uu Examples/lists.fig.uu
  25. #   Examples/roundboxes2.fig.uu d_ellipse.c object.h u_geom.c
  26. # Wrapped by envbvs@epb9.lbl.gov.lbl.gov on Mon May  3 12:05:50 1993
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'Doc/FORMAT2.1' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'Doc/FORMAT2.1'\"
  30. else
  31. echo shar: Extracting \"'Doc/FORMAT2.1'\" \(8354 characters\)
  32. sed "s/^X//" >'Doc/FORMAT2.1' <<'END_OF_FILE'
  33. XThe following is the format of fig output (fig 2.1).
  34. X
  35. X(1) The very first line is a comment line containing the name and version:
  36. X    #FIG 2.1
  37. X
  38. X    The character # at the first column of a line indicates that the line
  39. X    is a comment line which will be ignored.
  40. X
  41. X(2) The first non-comment line consists of two numbers :
  42. X
  43. X    int    fig_resolution        (pixels/inch)
  44. X    int    coordinate_system    (1 : origin is at the lower left corner
  45. X                     2 : Upper left)
  46. X
  47. X    Fig_resolution is the resolution fig is using for the current file.
  48. X    It must always be 80 for compatibility with this version of Fig.
  49. X    Pixels are assumed to be square.
  50. X
  51. X(3) The rest of the file contains various objects.  An object can be one
  52. X    of six classes (or types).
  53. X
  54. X      i)    Arc.
  55. X     ii)    Ellipse which is a generalization of circle.
  56. X    iii)    Polyline which includes polygon and box.
  57. X     iv)    Spline which includes closed/open control/interpolated spline.
  58. X      v)    Text.
  59. X     vi)    Compound object which is composed of one or more objects.
  60. X
  61. X    In the following elaboration on object formats, every value of fig
  62. X    output are separated by blank characters or new line ('\n').  The
  63. X    value of the not-used parameters will be -1.
  64. X
  65. X    Some fields are described as "enumeration type" or "bit vector"; the 
  66. X    values which these fields can take are defined in the header file object.h.
  67. X    The pen, arrow_type, and arrow_style fields are described as unused.
  68. X    These values may be defined in some future version of Fig.
  69. X
  70. X    The color field is defined as follows:
  71. X
  72. X    -1 = Default
  73. X     0 = Black
  74. X     1 = Blue
  75. X     2 = Green
  76. X     3 = Cyan
  77. X     4 = Red
  78. X     5 = Magenta
  79. X     6 = Yellow
  80. X     7 = White
  81. X     values from 8 to 2^30-1 = reserved for future use
  82. X
  83. X    The depth field is defined as follows:
  84. X
  85. X     0 ... 999 where larger value means object is deeper than (under)
  86. X           objects with smaller depth
  87. X
  88. X    The area fill field is defined as follows:
  89. X    
  90. X     0 = not filled
  91. X     1 = white
  92. X    ...  values from 2 to 20 are shades of grey, from lighter to darker
  93. X    21 = black
  94. X
  95. X    The line_style field is defined as follows:
  96. X
  97. X    -1 = Default
  98. X     0 = Solid
  99. X     1 = Dashed
  100. X     2 = Dotted
  101. X
  102. X    The style_val field is defined as the length, in pixels, of the on/off dashes
  103. X    for dashed lines, and the distance between the dots, in pixels, for dotted lines
  104. X    (3.1) ARC
  105. X
  106. X    First line :
  107. X    type    name            (brief description)
  108. X    ----    ----            -------------------
  109. X    int    object_code        (always 5)
  110. X    int    sub_type        (always    1)
  111. X    int    line_style        (enumeration type)
  112. X    int    line_thickness        (pixels)
  113. X    int    color            (enumeration type)
  114. X    int    depth            (no units)
  115. X    int    pen            (not used)
  116. X    int    area_fill        (enumeration type)
  117. X    float    style_val        (pixels)
  118. X    int    direction        (0 : clockwise, 1 : counterclockwise)
  119. X    int    forward_arrow        (0: no forward arrow, 1: on)
  120. X    int    backward_arrow        (0: no forward arrow, 1: on)
  121. X    float    center_x, center_y    (center of the arc)
  122. X    int    x1, y1            (pixels, the 1st point the user entered)
  123. X    int    x2, y2            (pixels, the 2nd point)
  124. X    int    x3, y3            (pixels, the last point)
  125. X
  126. X    Forward arrow line (Optional; absent if forward_arrow is 0) :
  127. X    type    name            (brief description)
  128. X    ----    ----            -------------------
  129. X    int    arrow_type        (not used)
  130. X    int    arrow_style        (not used)
  131. X    float    arrow_thickness        (pixels)
  132. X    float     arrow_width        (pixels)
  133. X    float    arrow_height        (pixels)
  134. X
  135. X    Backward arrow line (Optional; absent if backward_arrow is 0) :
  136. X    type    name            (brief description)
  137. X    ----    ----            -------------------
  138. X    int    arrow_type        (not used)
  139. X    int    arrow_style        (not used)
  140. X    float    arrow_thickness        (pixels)
  141. X    float    arrow_width        (pixels)
  142. X    float    arrow_height        (pixels)
  143. X
  144. X    (3.2) COMPOUND
  145. X
  146. X    A line with object code 6 signifies the start of a compound.
  147. X    There are four more numbers on this line which indicate the
  148. X    upper right corner and the lower left corner of the bounding
  149. X    box of this compound.  A line with object code -6 signifies
  150. X    the end of the compound.  Compound may be nested.
  151. X
  152. X    First line :
  153. X    type    name            (brief description)
  154. X    ----    ----            -------------------
  155. X    int    object_code        (always 6)
  156. X    int    upperright_corner_x    (pixels)
  157. X    int    upperright_corner_y    (pixels)
  158. X    int    lowerleft_corner_x    (pixels)
  159. X    int    lowerleft_corner_y    (pixels)
  160. X
  161. X    Subsequent lines :
  162. X    objects
  163. X    .
  164. X    .
  165. X
  166. X    Last line :
  167. X    -6
  168. X
  169. X    (3.3) ELLIPSE
  170. X
  171. X    First line :
  172. X    type    name            (brief description)
  173. X    ----    ----            -------------------
  174. X    int    object_code        (always 1)
  175. X    int    sub_type        (1 : ellipse defined by radiuses
  176. X                     2 : ellipse defined by diameters
  177. X                     3 : circle defined by radius
  178. X                     4 : circle defined by diameter)
  179. X    int    line_style        (enumeration type)
  180. X    int    thickness        (pixels)
  181. X    int    color            (enumeration type)
  182. X    int    depth            (no units)
  183. X    int    pen            (not used)
  184. X    int    area_fill        (enumeration type)
  185. X    float    style_val        (pixels)
  186. X    int    direction        (always 1)
  187. X    float    angle            (radians, the angle of the x-axis)
  188. X    int    center_x, center_y    (pixels)
  189. X    int    radius_x, radius_y    (pixels)
  190. X    int    start_x, start_y    (pixels; the 1st point entered)
  191. X    int    end_x, end_y        (pixels; the last point entered)
  192. X
  193. X    (3.4) POLYLINE
  194. X
  195. X    First line :
  196. X    type    name            (brief description)
  197. X    ----    ----            -------------------
  198. X    int    object_code        (always 2)
  199. X    int    sub_type        (1 : polyline
  200. X                     2 : box
  201. X                     3 : polygon
  202. X                     4 : arc-box)
  203. X                     5 : imported-eps bounding-box)
  204. X    int    line_style        (enumeration type)
  205. X    int    thickness        (pixels)
  206. X    int    color            (enumeration type)
  207. X    int    depth            (no units)
  208. X    int    pen            (not used)
  209. X    int    area_fill        (enumeration type)
  210. X    float    style_val        (pixels)
  211. X    int    radius            (pixels)
  212. X    int    forward_arrow        (0: off, 1: on)
  213. X    int    backward_arrow        (0: off, 1: on)
  214. X
  215. X    Forward arrow line : same as ARC object
  216. X
  217. X    Backward arrow line : same as ARC object
  218. X
  219. X    Points line :
  220. X    type    name            (brief description)
  221. X    ----    ----            -------------------
  222. X    int    x1, y1            (pixels)
  223. X    int    x2, y2            (pixels)
  224. X      .
  225. X      .
  226. X    int    xn, yn            (this will be the same as the 1st
  227. X                    point for polygon and box)
  228. X    int    x, y            (always 9999, 9999; marks the end of
  229. X                    point for polygon and box)
  230. X
  231. X    EPS line :
  232. X    type    name            (brief description)
  233. X    ----    ----            -------------------
  234. X    boolean    flipped            orientation = normal (0) or flipped (1)
  235. X    char    file[]            name of eps file to import
  236. X
  237. X    (3.5) SPLINE
  238. X
  239. X    First line :
  240. X    type    name            (brief description)
  241. X    ----    ----            -------------------
  242. X    int    object_code        (always 3)
  243. X    int    sub_type        (0 : open spline
  244. X                     1 : closed spline
  245. X                     2 : open interpolated spline
  246. X                     3 : closed interpolated spline)
  247. X    int    line_style        (See the end of this section)
  248. X    int    thickness        (pixels)
  249. X    int    color            (enumeration type)
  250. X    int    depth            (no units)
  251. X    int    pen            (not used)
  252. X    int    area_fill        (enumeration type)
  253. X    float    style_val        (pixels)
  254. X    int    forward_arrow        (0: off, 1: on)
  255. X    int    backward_arrow        (0: off, 1: on)
  256. X
  257. X    Forward arrow line : same as ARC object
  258. X
  259. X    Backward arrow line : same as ARC object
  260. X
  261. X    Points line : same as POLYLINE object
  262. X
  263. X    Control points line (absent if sub_type is 1 or 2) :
  264. X    Control points of interpolated spline.  There are two control
  265. X    points for each knots.  A section i, of the spline is drawn
  266. X    using Bezier cubic with the following four points:
  267. X        (x ,y ), (rx ,ry ), (lx      , ly   ), (x   , y   ).
  268. X          i  i        i    i      i+1    i+1     i+1   i+1
  269. X    For closed interpolated spline the last pair of control points,
  270. X    (lxn,lyn) and (rxn,ryn) (which can be ignored), are the same as
  271. X    (lx1,ly1) and (rx1,ry1) respectively.
  272. X
  273. X    type    name            (brief description)
  274. X    ----    ----            -------------------
  275. X    float    lx1, ly1        (pixels)
  276. X    float    rx1, ry1        (pixels)
  277. X    float    lx2, ly2        (pixels)
  278. X    float    rx2, ry2        (pixels)
  279. X      .
  280. X      .
  281. X    float    lxn, lyn        (pixels)
  282. X    float    rxn, ryn        (pixels)
  283. X
  284. X    (3.6) TEXT
  285. X    type    name            (brief description)
  286. X    ----    ----            -------------------
  287. X    int    object             (always 4)
  288. X    int    sub_type        (0 : Left justified
  289. X                     1 : Center justified
  290. X                     2 : Right justified)
  291. X    int    font             (enumeration type)
  292. X    int    font_size         (points)
  293. X    int    pen            (not used)
  294. X    int    color            (enumeration type)
  295. X    int    depth            (no units)
  296. X    float    angle            (radians, the angle of the text)
  297. X    int    font_flags        (bit vector)
  298. X    int    height            (pixels)
  299. X    int    length            (pixels)
  300. X    int    x, y            (pixels, coordinate of the origin
  301. X                     of the string.  If sub_type = 0, it is
  302. X                     the lower left corner of the string.
  303. X                     If sub_type = 1, it is the lower
  304. X                     center.  Otherwise it is the lower
  305. X                     right corner of the string.)
  306. X    char    string[]        (ascii characters; starts after a blank
  307. X                    character following the last number and
  308. X                    ends before the character '\1'.  This
  309. X                    character is not part of the string.
  310. X                    Note that the string may contain '\n'.)
  311. END_OF_FILE
  312. if test 8354 -ne `wc -c <'Doc/FORMAT2.1'`; then
  313.     echo shar: \"'Doc/FORMAT2.1'\" unpacked with wrong size!
  314. fi
  315. # end of 'Doc/FORMAT2.1'
  316. fi
  317. if test -f 'Examples/houseD.fig.uu' -a "${1}" != "-c" ; then 
  318.   echo shar: Will not clobber existing file \"'Examples/houseD.fig.uu'\"
  319. else
  320. echo shar: Extracting \"'Examples/houseD.fig.uu'\" \(8465 characters\)
  321. sed "s/^X//" >'Examples/houseD.fig.uu' <<'END_OF_FILE'
  322. Xbegin 444 houseD.fig
  323. XM(T9)1R`R+C$*.#`@,@HU(#$@,"`Q("TQ(#`@,"`P(#`N,#`P(#$@,"`P(#(V
  324. XM.2XV-3@@,C(Y+C8U."`R-CD@,C<T(#,P,B`R-C`@,S$T(#(R.0HU(#$@,"`Q
  325. XM("TQ(#`@,"`P(#`N,#`P(#`@,"`P(#$Y-BXW,#`@,C`Q+C<P,"`R,30@,C`T
  326. XM(#(Q,"`R,3,@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C0Y($12`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#,S(#(S
  448. XM-"`Q-#D@0D%42`$*-"`P(#`@,3(@,"`M,2`P(#`N,#`P(#0@.2`W(#$U,2`S
  449. XM,S$@5`$*-"`P(#`@,3(@,"`M,2`P(#`N,#`P(#0@.2`R-2`R,#D@-#`Y($)%
  450. XM1`$*-"`P(#`@,3(@,"`M,2`P(#`N,#`P(#0@.2`S,"`S.3D@-CD@,C<G(#(B
  451. XM`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#0P(#4R.2`S-SD@4U151%D!
  452. XM"C0@,"`P(#$R(#`@+3$@,"`P+C`P,"`T(#D@,3$U(#(R."`S,#4@34%35$52
  453. XM($)%1%)/3TT!"C0@,"`P(#$R(#`@+3$@,"`P+C`P,"`T(#$R(#4T(#$Y(#,Y
  454. XM.2!H;W5S940N9FEG`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#$X(#0S
  455. XM-"`T,CD@0TPN`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#$W(#,U-"`T
  456. XM.#0@1%(!"C0@,"`P(#$R(#`@+3$@,"`P+C`P,"`T(#D@,S(@-3$Y(#0V.2!$
  457. XM15-+`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#,P(#8X-"`S,#0@,C$G
  458. XM(#8B`0HT(#`@,"`Q,B`P("TQ(#`@,"XP,#`@-"`Y(#,Y(#4R-"`Q,C0@1$]7
  459. X#3@$*
  460. X`
  461. Xend
  462. END_OF_FILE
  463. if test 8465 -ne `wc -c <'Examples/houseD.fig.uu'`; then
  464.     echo shar: \"'Examples/houseD.fig.uu'\" unpacked with wrong size!
  465. fi
  466. # end of 'Examples/houseD.fig.uu'
  467. fi
  468. if test -f 'Examples/lists.fig.uu' -a "${1}" != "-c" ; then 
  469.   echo shar: Will not clobber existing file \"'Examples/lists.fig.uu'\"
  470. else
  471. echo shar: Extracting \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-c <'Examples/lists.fig.uu'`; then
  614.     echo shar: \"'Examples/lists.fig.uu'\" unpacked with wrong size!
  615. fi
  616. # end of 'Examples/lists.fig.uu'
  617. fi
  618. if test -f 'Examples/roundboxes2.fig.uu' -a "${1}" != "-c" ; then 
  619.   echo shar: Will not clobber existing file \"'Examples/roundboxes2.fig.uu'\"
  620. else
  621. echo shar: Extracting \"'Examples/roundboxes2.fig.uu'\" \(8142 characters\)
  622. sed "s/^X//" >'Examples/roundboxes2.fig.uu' <<'END_OF_FILE'
  623. Xbegin 444 roundboxes2.fig
  624. XM(T9)1R`R+C`*.#`@,@HR(#0@,"`Q(#`@,"`P(#`@,"XP,#`@,C$@,"`P"@D@
  625. XM-#8Y(#8T(#0V.2`S,#0@-C0T(#,P-"`V-#0@-C0@-#8Y(#8T(#DY.3D@.3DY
  626. XM.0HR(#0@,"`Q(#`@,"`P(#`@,"XP,#`@,C$@,"`P"@D@-S`Y(#0X-"`W,#D@
  627. XM,S`Y(#0V.2`S,#D@-#8Y(#0X-"`W,#D@-#@T(#DY.3D@.3DY.0HR(#0@,"`Q
  628. XM(#`@,"`P(#`@,"XP,#`@,C$@,"`P"@D@,C@Y(#,P.2`R.#D@-30Y(#0V-"`U
  629. XM-#D@-#8T(#,P.2`R.#D@,S`Y(#DY.3D@.3DY.0HR(#0@,"`Q(#`@,"`P(#`@
  630. XM,"XP,#`@,C$@,"`P"@D@-#8T(#,P.2`T-C0@,3,T(#(R-"`Q,S0@,C(T(#,P
  631. XM.2`T-C0@,S`Y(#DY.3D@.3DY.0HR(#0@,"`Q(#`@,"`P(#`@,"XP,#`@,C`@
  632. XM,"`P"@D@,C(Y(#$S.2`R,CD@,S`T(#0U.2`S,#0@-#4Y(#$S.2`R,CD@,3,Y
  633. XM(#DY.3D@.3DY.0HR(#0@,"`Q(#`@,"`P(#`@,"XP,#`@,C`@,"`P"@D@,CDT
  634. XM(#,Q-"`R.30@-30T(#0U.2`U-#0@-#4Y(#,Q-"`R.30@,S$T(#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roundboxes2.fig.uu'\" unpacked with wrong size!
  760. fi
  761. # end of 'Examples/roundboxes2.fig.uu'
  762. fi
  763. if test -f 'd_ellipse.c' -a "${1}" != "-c" ; then 
  764.   echo shar: Will not clobber existing file \"'d_ellipse.c'\"
  765. else
  766. echo shar: Extracting \"'d_ellipse.c'\" \(9045 characters\)
  767. sed "s/^X//" >'d_ellipse.c' <<'END_OF_FILE'
  768. X/*
  769. X * FIG : Facility for Interactive Generation of figures
  770. X * Copyright (c) 1985 by Supoj Sutanthavibul
  771. X *
  772. X * "Permission to use, copy, modify, distribute, and sell this software and its
  773. X * documentation for any purpose is hereby granted without fee, provided that
  774. X * the above copyright notice appear in all copies and that both the copyright
  775. X * notice and this permission notice appear in supporting documentation. 
  776. X * No representations are made about the suitability of this software for 
  777. X * any purpose.  It is provided "as is" without express or implied warranty."
  778. X */
  779. X
  780. X#include "fig.h"
  781. X#include "resources.h"
  782. X#include "mode.h"
  783. X#include "object.h"
  784. X#include "paintop.h"
  785. X#include "u_create.h"
  786. X#include "u_elastic.h"
  787. X#include "u_list.h"
  788. X#include "w_canvas.h"
  789. X#include "w_mousefun.h"
  790. X
  791. X/*************************  local procedures  ********************/
  792. X
  793. Xstatic int    init_ellipsebyradius_drawing();
  794. Xstatic int    init_ellipsebydiameter_drawing();
  795. Xstatic int    init_circlebyradius_drawing();
  796. Xstatic int    init_circlebydiameter_drawing();
  797. Xstatic int    create_ellipsebydia();
  798. Xstatic int    create_ellipsebyrad();
  799. Xstatic int    create_circlebyrad();
  800. Xstatic int    create_circlebydia();
  801. Xstatic int    cancel_ellipsebydia();
  802. Xstatic int    cancel_ellipsebyrad();
  803. Xstatic int    cancel_circlebyrad();
  804. Xstatic int    cancel_circlebydia();
  805. X
  806. Xellipsebyradius_drawing_selected()
  807. X{
  808. X    canvas_kbd_proc = null_proc;
  809. X    canvas_locmove_proc = null_proc;
  810. X    canvas_leftbut_proc = init_ellipsebyradius_drawing;
  811. X    canvas_middlebut_proc = null_proc;
  812. X    canvas_rightbut_proc = null_proc;
  813. X    set_cursor(arrow_cursor);
  814. X    set_mousefun("center point", "", "");
  815. X    reset_action_on();
  816. X}
  817. X
  818. Xstatic
  819. Xinit_ellipsebyradius_drawing(x, y)
  820. X    int            x, y;
  821. X{
  822. X    cur_x = fix_x = x;
  823. X    cur_y = fix_y = y;
  824. X    cur_angle = cur_elltextangle/180.0*M_PI;
  825. X    center_marker(fix_x, fix_y);
  826. X    set_mousefun("corner point", "", "cancel");
  827. X    draw_mousefun_canvas();
  828. X    canvas_locmove_proc = resizing_ebr;
  829. X    canvas_rightbut_proc = cancel_ellipsebyrad;
  830. X    canvas_leftbut_proc = create_ellipsebyrad;
  831. X    set_temp_cursor(null_cursor);
  832. X    elastic_ebr();
  833. X    set_action_on();
  834. X}
  835. X
  836. Xstatic
  837. Xcancel_ellipsebyrad()
  838. X{
  839. X    elastic_ebr();
  840. X    center_marker(fix_x, fix_y);
  841. X    ellipsebyradius_drawing_selected();
  842. X    draw_mousefun_canvas();
  843. X}
  844. X
  845. Xstatic
  846. Xcreate_ellipsebyrad(x, y)
  847. X    int            x, y;
  848. X{
  849. X    F_ellipse       *ellipse;
  850. X
  851. X    elastic_ebr();
  852. X    center_marker(fix_x, fix_y);
  853. X    if ((ellipse = create_ellipse()) == NULL)
  854. X    return;
  855. X
  856. X    ellipse->type = T_ELLIPSE_BY_RAD;
  857. X    ellipse->style = cur_linestyle;
  858. X    ellipse->thickness = cur_linewidth;
  859. X    ellipse->style_val = cur_styleval * (cur_linewidth + 1) / 2;
  860. X    ellipse->angle = cur_elltextangle/180.0*M_PI;    /* convert to radians */
  861. X    ellipse->color = cur_color;
  862. X    ellipse->depth = cur_depth;
  863. X    ellipse->pen = 0;
  864. X    ellipse->fill_style = cur_fillstyle;
  865. X    ellipse->direction = 1;
  866. X    ellipse->center.x = fix_x;
  867. X    ellipse->center.y = fix_y;
  868. X    ellipse->radiuses.x = abs(x - fix_x);
  869. X    ellipse->radiuses.y = abs(y - fix_y);
  870. X    ellipse->start.x = fix_x;
  871. X    ellipse->start.y = fix_y;
  872. X    ellipse->end.x = x;
  873. X    ellipse->end.y = y;
  874. X    ellipse->next = NULL;
  875. X    draw_ellipse(ellipse, PAINT);
  876. X    add_ellipse(ellipse);
  877. X    ellipsebyradius_drawing_selected();
  878. X    draw_mousefun_canvas();
  879. X}
  880. X
  881. Xellipsebydiameter_drawing_selected()
  882. X{
  883. X    set_mousefun("first corner", "", "");
  884. X    canvas_kbd_proc = null_proc;
  885. X    canvas_locmove_proc = null_proc;
  886. X    canvas_leftbut_proc = init_ellipsebydiameter_drawing;
  887. X    canvas_middlebut_proc = null_proc;
  888. X    canvas_rightbut_proc = null_proc;
  889. X    set_cursor(arrow_cursor);
  890. X    reset_action_on();
  891. X}
  892. X
  893. Xstatic
  894. Xinit_ellipsebydiameter_drawing(x, y)
  895. X    int            x, y;
  896. X{
  897. X    cur_x = fix_x = x;
  898. X    cur_y = fix_y = y;
  899. X    cur_angle = cur_elltextangle/180.0*M_PI;
  900. X    center_marker(fix_x, fix_y);
  901. X    set_mousefun("final corner", "", "cancel");
  902. X    draw_mousefun_canvas();
  903. X    canvas_locmove_proc = resizing_ebd;
  904. X    canvas_rightbut_proc = cancel_ellipsebydia;
  905. X    canvas_leftbut_proc = create_ellipsebydia;
  906. X    set_temp_cursor(null_cursor);
  907. X    elastic_ebd();
  908. X    set_action_on();
  909. X}
  910. X
  911. Xstatic
  912. Xcancel_ellipsebydia()
  913. X{
  914. X    elastic_ebd();
  915. X    center_marker(fix_x, fix_y);
  916. X    ellipsebydiameter_drawing_selected();
  917. X    draw_mousefun_canvas();
  918. X}
  919. X
  920. Xstatic
  921. Xcreate_ellipsebydia(x, y)
  922. X    int            x, y;
  923. X{
  924. X    F_ellipse       *ellipse;
  925. X
  926. X    elastic_ebd();
  927. X    center_marker(fix_x, fix_y);
  928. X    if ((ellipse = create_ellipse()) == NULL)
  929. X    return;
  930. X
  931. X    ellipse->type = T_ELLIPSE_BY_DIA;
  932. X    ellipse->style = cur_linestyle;
  933. X    ellipse->thickness = cur_linewidth;
  934. X    ellipse->style_val = cur_styleval * (cur_linewidth + 1) / 2;
  935. X    ellipse->angle = cur_elltextangle/180.0*M_PI;    /* convert to radians */
  936. X    ellipse->color = cur_color;
  937. X    ellipse->depth = cur_depth;
  938. X    ellipse->pen = 0;
  939. X    ellipse->fill_style = cur_fillstyle;
  940. X    ellipse->direction = 1;
  941. X    ellipse->center.x = (fix_x + x) / 2;
  942. X    ellipse->center.y = (fix_y + y) / 2;
  943. X    ellipse->radiuses.x = abs(ellipse->center.x - fix_x);
  944. X    ellipse->radiuses.y = abs(ellipse->center.y - fix_y);
  945. X    ellipse->start.x = fix_x;
  946. X    ellipse->start.y = fix_y;
  947. X    ellipse->end.x = x;
  948. X    ellipse->end.y = y;
  949. X    ellipse->next = NULL;
  950. X    draw_ellipse(ellipse, PAINT);
  951. X    add_ellipse(ellipse);
  952. X    ellipsebydiameter_drawing_selected();
  953. X    draw_mousefun_canvas();
  954. X}
  955. X
  956. X/***************************  circle  section  ************************/
  957. X
  958. Xcirclebyradius_drawing_selected()
  959. X{
  960. X    set_mousefun("center point", "", "");
  961. X    canvas_kbd_proc = null_proc;
  962. X    canvas_locmove_proc = null_proc;
  963. X    canvas_leftbut_proc = init_circlebyradius_drawing;
  964. X    canvas_middlebut_proc = null_proc;
  965. X    canvas_rightbut_proc = null_proc;
  966. X    set_cursor(arrow_cursor);
  967. X    reset_action_on();
  968. X}
  969. X
  970. Xstatic
  971. Xinit_circlebyradius_drawing(x, y)
  972. X    int            x, y;
  973. X{
  974. X    cur_x = fix_x = x;
  975. X    cur_y = fix_y = y;
  976. X    center_marker(fix_x, fix_y);
  977. X    set_mousefun("set radius", "", "cancel");
  978. X    draw_mousefun_canvas();
  979. X    canvas_locmove_proc = resizing_cbr;
  980. X    canvas_rightbut_proc = cancel_circlebyrad;
  981. X    canvas_leftbut_proc = create_circlebyrad;
  982. X    set_temp_cursor(null_cursor);
  983. X    elastic_cbr();
  984. X    set_action_on();
  985. X}
  986. X
  987. Xstatic
  988. Xcancel_circlebyrad()
  989. X{
  990. X    elastic_cbr();
  991. X    center_marker(fix_x, fix_y);
  992. X    circlebyradius_drawing_selected();
  993. X    draw_mousefun_canvas();
  994. X}
  995. X
  996. Xstatic
  997. Xcreate_circlebyrad(x, y)
  998. X    int            x, y;
  999. X{
  1000. X    F_ellipse       *c;
  1001. X    int            rx, ry;
  1002. X
  1003. X    elastic_cbr();
  1004. X    center_marker(fix_x, fix_y);
  1005. X    if ((c = create_ellipse()) == NULL)
  1006. X    return;
  1007. X
  1008. X    c->type = T_CIRCLE_BY_RAD;
  1009. X    c->style = cur_linestyle;
  1010. X    c->thickness = cur_linewidth;
  1011. X    c->style_val = cur_styleval * (cur_linewidth + 1) / 2;
  1012. X    c->angle = 0.0;
  1013. X    c->color = cur_color;
  1014. X    c->depth = cur_depth;
  1015. X    c->pen = 0;
  1016. X    c->fill_style = cur_fillstyle;
  1017. X    c->direction = 1;
  1018. X    c->center.x = fix_x;
  1019. X    c->center.y = fix_y;
  1020. X    rx = fix_x - x;
  1021. X    ry = fix_y - y;
  1022. X    c->radiuses.x = c->radiuses.y = round(sqrt((double) (rx * rx + ry * ry)));
  1023. X    c->start.x = fix_x;
  1024. X    c->start.y = fix_y;
  1025. X    c->end.x = x;
  1026. X    c->end.y = y;
  1027. X    c->next = NULL;
  1028. X    draw_ellipse(c, PAINT);
  1029. X    add_ellipse(c);
  1030. X    circlebyradius_drawing_selected();
  1031. X    draw_mousefun_canvas();
  1032. X}
  1033. X
  1034. Xcirclebydiameter_drawing_selected()
  1035. X{
  1036. X    set_mousefun("diameter point", "", "");
  1037. X    canvas_kbd_proc = null_proc;
  1038. X    canvas_locmove_proc = null_proc;
  1039. X    canvas_leftbut_proc = init_circlebydiameter_drawing;
  1040. X    canvas_middlebut_proc = null_proc;
  1041. X    canvas_rightbut_proc = null_proc;
  1042. X    set_cursor(arrow_cursor);
  1043. X    reset_action_on();
  1044. X}
  1045. X
  1046. Xstatic
  1047. Xinit_circlebydiameter_drawing(x, y)
  1048. X    int            x, y;
  1049. X{
  1050. X    cur_x = fix_x = x;
  1051. X    cur_y = fix_y = y;
  1052. X    center_marker(fix_x, fix_y);
  1053. X    set_mousefun("final point", "", "cancel");
  1054. X    draw_mousefun_canvas();
  1055. X    canvas_locmove_proc = resizing_cbd;
  1056. X    canvas_leftbut_proc = create_circlebydia;
  1057. X    canvas_rightbut_proc = cancel_circlebydia;
  1058. X    set_temp_cursor(null_cursor);
  1059. X    elastic_cbd();
  1060. X    set_action_on();
  1061. X}
  1062. X
  1063. Xstatic
  1064. Xcancel_circlebydia()
  1065. X{
  1066. X    elastic_cbd();
  1067. X    center_marker(fix_x, fix_y);
  1068. X    circlebydiameter_drawing_selected();
  1069. X    draw_mousefun_canvas();
  1070. X}
  1071. X
  1072. Xstatic
  1073. Xcreate_circlebydia(x, y)
  1074. X    int            x, y;
  1075. X{
  1076. X    F_ellipse       *c;
  1077. X    int            rx, ry;
  1078. X
  1079. X    elastic_cbd();
  1080. X    center_marker(fix_x, fix_y);
  1081. X    if ((c = create_ellipse()) == NULL)
  1082. X    return;
  1083. X
  1084. X    c->type = T_CIRCLE_BY_DIA;
  1085. X    c->style = cur_linestyle;
  1086. X    c->thickness = cur_linewidth;
  1087. X    c->style_val = cur_styleval * (cur_linewidth + 1) / 2;
  1088. X    c->angle = 0.0;
  1089. X    c->color = cur_color;
  1090. X    c->depth = cur_depth;
  1091. X    c->pen = 0;
  1092. X    c->fill_style = cur_fillstyle;
  1093. X    c->direction = 1;
  1094. X    c->center.x = (fix_x + x) / 2 + .5;
  1095. X    c->center.y = (fix_y + y) / 2 + .5;
  1096. X    rx = x - c->center.x;
  1097. X    ry = y - c->center.y;
  1098. X    c->radiuses.x = c->radiuses.y = round(sqrt((double) (rx * rx + ry * ry)));
  1099. X    c->start.x = fix_x;
  1100. X    c->start.y = fix_y;
  1101. X    c->end.x = x;
  1102. X    c->end.y = y;
  1103. X    c->next = NULL;
  1104. X    draw_ellipse(c, PAINT);
  1105. X    add_ellipse(c);
  1106. X    circlebydiameter_drawing_selected();
  1107. X    draw_mousefun_canvas();
  1108. X}
  1109. END_OF_FILE
  1110. if test 9045 -ne `wc -c <'d_ellipse.c'`; then
  1111.     echo shar: \"'d_ellipse.c'\" unpacked with wrong size!
  1112. fi
  1113. # end of 'd_ellipse.c'
  1114. fi
  1115. if test -f 'object.h' -a "${1}" != "-c" ; then 
  1116.   echo shar: Will not clobber existing file \"'object.h'\"
  1117. else
  1118. echo shar: Extracting \"'object.h'\" \(8953 characters\)
  1119. sed "s/^X//" >'object.h' <<'END_OF_FILE'
  1120. X/*
  1121. X * FIG : Facility for Interactive Generation of figures
  1122. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1123. X *
  1124. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1125. X * documentation for any purpose is hereby granted without fee, provided that
  1126. X * the above copyright notice appear in all copies and that both the copyright
  1127. X * notice and this permission notice appear in supporting documentation. 
  1128. X * No representations are made about the suitability of this software for 
  1129. X * any purpose.  It is provided "as is" without express or implied warranty."
  1130. X */
  1131. X
  1132. X#define        DEFAULT              (-1)
  1133. X#define        SOLID_LINE        0
  1134. X#define        DASH_LINE        1
  1135. X#define        DOTTED_LINE        2
  1136. X#define        RUBBER_LINE        3
  1137. X#define        PANEL_LINE        4
  1138. X
  1139. X#define        Color            int
  1140. X
  1141. X#define        BLACK            0
  1142. X#define        WHITE            7
  1143. X
  1144. Xtypedef struct f_pattern {
  1145. X    int            w, h;
  1146. X    int           *p;
  1147. X}
  1148. X        F_pattern;
  1149. X
  1150. Xtypedef struct f_point {
  1151. X    int            x, y;
  1152. X    struct f_point *next;
  1153. X}
  1154. X        F_point;
  1155. X
  1156. Xtypedef struct f_pos {
  1157. X    int            x, y;
  1158. X}
  1159. X        F_pos;
  1160. X
  1161. Xtypedef struct f_arrow {
  1162. X    int            type;
  1163. X    int            style;
  1164. X    float        thickness;
  1165. X    float        wid;
  1166. X    float        ht;
  1167. X}
  1168. X        F_arrow;
  1169. X
  1170. Xtypedef struct f_ellipse {
  1171. X    int            tagged;
  1172. X    int            type;
  1173. X#define                    T_ELLIPSE_BY_RAD    1
  1174. X#define                    T_ELLIPSE_BY_DIA    2
  1175. X#define                    T_CIRCLE_BY_RAD        3
  1176. X#define                    T_CIRCLE_BY_DIA        4
  1177. X    int            style;
  1178. X    int            thickness;
  1179. X    Color        color;
  1180. X    int            depth;
  1181. X    int            direction;
  1182. X    float        style_val;
  1183. X    float        angle;
  1184. X    int            pen;
  1185. X    int            fill_style;
  1186. X#define                    UNFILLED    0
  1187. X#define                    WHITE_FILL    1
  1188. X#define                    BLACK_FILL    21
  1189. X    struct f_pos    center;
  1190. X    struct f_pos    radiuses;
  1191. X    struct f_pos    start;
  1192. X    struct f_pos    end;
  1193. X    struct f_ellipse *next;
  1194. X}
  1195. X        F_ellipse;
  1196. X
  1197. Xtypedef struct f_arc {
  1198. X    int            tagged;
  1199. X    int            type;
  1200. X#define                    T_3_POINTS_ARC        1
  1201. X    int            style;
  1202. X    int            thickness;
  1203. X    Color        color;
  1204. X    int            depth;
  1205. X    int            pen;
  1206. X    int            fill_style;
  1207. X    float        style_val;
  1208. X    int            direction;
  1209. X    struct f_arrow *for_arrow;
  1210. X    struct f_arrow *back_arrow;
  1211. X    struct {
  1212. X    float        x, y;
  1213. X    }            center;
  1214. X    struct f_pos    point[3];
  1215. X    struct f_arc   *next;
  1216. X}
  1217. X        F_arc;
  1218. X
  1219. X#define        CLOSED_PATH        0
  1220. X#define        OPEN_PATH        1
  1221. X#define        DEF_BOXRADIUS        7
  1222. X#define        DEF_DASHLENGTH        4
  1223. X#define        DEF_DOTGAP        3
  1224. X
  1225. Xtypedef struct f_eps {
  1226. X    char        file[PATH_MAX];
  1227. X    int            flipped;
  1228. X    unsigned char  *bitmap;
  1229. X    float        hw_ratio;
  1230. X    int            size_x, size_y;
  1231. X    struct f_pos    bit_size;
  1232. X    Pixmap        pixmap;
  1233. X    int            pix_rotation, pix_width, pix_height, pix_flipped;
  1234. X}
  1235. X        F_eps;
  1236. X
  1237. Xextern char    EMPTY_EPS[];
  1238. X
  1239. Xtypedef struct f_line {
  1240. X    int            tagged;
  1241. X    int            type;
  1242. X#define                    T_POLYLINE    1
  1243. X#define                    T_BOX        2
  1244. X#define                    T_POLYGON    3
  1245. X#define                    T_ARC_BOX    4
  1246. X#define                    T_EPS_BOX    5
  1247. X    int            style;
  1248. X    int            thickness;
  1249. X    Color        color;
  1250. X    int            depth;
  1251. X    float        style_val;
  1252. X    int            pen;
  1253. X    int            fill_style;
  1254. X    int            radius;    /* corner radius for T_ARC_BOX */
  1255. X    struct f_arrow *for_arrow;
  1256. X    struct f_arrow *back_arrow;
  1257. X    struct f_point *points;
  1258. X    struct f_eps   *eps;
  1259. X    struct f_line  *next;
  1260. X}
  1261. X        F_line;
  1262. X
  1263. Xtypedef struct f_text {
  1264. X    int            tagged;
  1265. X    int            type;
  1266. X#define                    T_LEFT_JUSTIFIED    0
  1267. X#define                    T_CENTER_JUSTIFIED    1
  1268. X#define                    T_RIGHT_JUSTIFIED    2
  1269. X    int            font;
  1270. X    PIX_ROT_FONT    fontstruct;
  1271. X    int            size;    /* point size */
  1272. X    Color        color;
  1273. X    int            depth;
  1274. X    float        angle;    /* in radian */
  1275. X
  1276. X    int            flags;
  1277. X#define                    RIGID_TEXT        1
  1278. X#define                    SPECIAL_TEXT        2
  1279. X#define                    PSFONT_TEXT        4
  1280. X#define                    HIDDEN_TEXT        8
  1281. X
  1282. X    int            height;    /* pixels */
  1283. X    int            length;    /* pixels */
  1284. X    int            base_x;
  1285. X    int            base_y;
  1286. X    int            pen;
  1287. X    char       *cstring;
  1288. X    struct f_text  *next;
  1289. X}
  1290. X        F_text;
  1291. X
  1292. X#define MAXFONT(T) (psfont_text(T) ? NUM_PS_FONTS : NUM_LATEX_FONTS)
  1293. X
  1294. X#define        rigid_text(t) \
  1295. X            (t->flags == DEFAULT \
  1296. X                || (t->flags & RIGID_TEXT))
  1297. X
  1298. X#define        special_text(t) \
  1299. X            ((t->flags != DEFAULT \
  1300. X                && (t->flags & SPECIAL_TEXT)))
  1301. X
  1302. X#define        psfont_text(t) \
  1303. X            (t->flags != DEFAULT \
  1304. X                && (t->flags & PSFONT_TEXT))
  1305. X
  1306. X#define        hidden_text(t) \
  1307. X            (t->flags != DEFAULT \
  1308. X                && (t->flags & HIDDEN_TEXT))
  1309. X
  1310. X#define        text_length(t) \
  1311. X            (hidden_text(t) ? hidden_text_length : t->length)
  1312. X
  1313. X#define        using_ps    (cur_textflags & PSFONT_TEXT)
  1314. X
  1315. Xtypedef struct f_control {
  1316. X    float        lx, ly, rx, ry;
  1317. X    struct f_control *next;
  1318. X}
  1319. X        F_control;
  1320. X
  1321. X#define        int_spline(s)        (s->type & 0x2)
  1322. X#define        normal_spline(s)    (!(s->type & 0x2))
  1323. X#define        closed_spline(s)    (s->type & 0x1)
  1324. X#define        open_spline(s)        (!(s->type & 0x1))
  1325. X
  1326. Xtypedef struct f_spline {
  1327. X    int            tagged;
  1328. X    int            type;
  1329. X#define                    T_OPEN_NORMAL    0
  1330. X#define                    T_CLOSED_NORMAL 1
  1331. X#define                    T_OPEN_INTERP    2
  1332. X#define                    T_CLOSED_INTERP 3
  1333. X    int            style;
  1334. X    int            thickness;
  1335. X    Color        color;
  1336. X    int            depth;
  1337. X    float        style_val;
  1338. X    int            pen;
  1339. X    int            fill_style;
  1340. X    struct f_arrow *for_arrow;
  1341. X    struct f_arrow *back_arrow;
  1342. X    /*
  1343. X     * For T_OPEN_NORMAL and T_CLOSED_NORMAL points are control points while
  1344. X     * they are knots for T_OPEN_INTERP and T_CLOSED_INTERP whose control
  1345. X     * points are stored in controls.
  1346. X     */
  1347. X    struct f_point *points;
  1348. X    struct f_control *controls;
  1349. X    struct f_spline *next;
  1350. X}
  1351. X        F_spline;
  1352. X
  1353. Xtypedef struct f_compound {
  1354. X    int            tagged;
  1355. X    struct f_pos    nwcorner;
  1356. X    struct f_pos    secorner;
  1357. X    struct f_line  *lines;
  1358. X    struct f_ellipse *ellipses;
  1359. X    struct f_spline *splines;
  1360. X    struct f_text  *texts;
  1361. X    struct f_arc   *arcs;
  1362. X    struct f_compound *compounds;
  1363. X    struct f_compound *next;
  1364. X}
  1365. X        F_compound;
  1366. X
  1367. Xtypedef struct f_linkinfo {
  1368. X    struct f_line  *line;
  1369. X    struct f_point *endpt;
  1370. X    struct f_point *prevpt;
  1371. X    int            two_pts;
  1372. X    struct f_linkinfo *next;
  1373. X}
  1374. X        F_linkinfo;
  1375. X
  1376. X#define        ARROW_SIZE        sizeof(struct f_arrow)
  1377. X#define        POINT_SIZE        sizeof(struct f_point)
  1378. X#define        CONTROL_SIZE        sizeof(struct f_control)
  1379. X#define        ELLOBJ_SIZE        sizeof(struct f_ellipse)
  1380. X#define        ARCOBJ_SIZE        sizeof(struct f_arc)
  1381. X#define        LINOBJ_SIZE        sizeof(struct f_line)
  1382. X#define        TEXOBJ_SIZE        sizeof(struct f_text)
  1383. X#define        SPLOBJ_SIZE        sizeof(struct f_spline)
  1384. X#define        COMOBJ_SIZE        sizeof(struct f_compound)
  1385. X#define        EPS_SIZE        sizeof(struct f_eps)
  1386. X#define        LINKINFO_SIZE        sizeof(struct f_linkinfo)
  1387. X
  1388. X/**********************  object codes  **********************/
  1389. X
  1390. X#define        O_ELLIPSE        1
  1391. X#define        O_POLYLINE        2
  1392. X#define        O_SPLINE        3
  1393. X#define        O_TEXT            4
  1394. X#define        O_ARC            5
  1395. X#define        O_COMPOUND        6
  1396. X#define        O_END_COMPOUND        -O_COMPOUND
  1397. X#define        O_ALL_OBJECT        99
  1398. X
  1399. X/********************* object masks for update  ************************/
  1400. X
  1401. X#define M_NONE            0x000
  1402. X#define M_POLYLINE_POLYGON    0x001
  1403. X#define M_POLYLINE_LINE        0x002
  1404. X#define M_POLYLINE_BOX        0x004    /* includes ARCBOX */
  1405. X#define M_SPLINE_O_NORMAL    0x008
  1406. X#define M_SPLINE_C_NORMAL    0x010
  1407. X#define M_SPLINE_O_INTERP    0x020
  1408. X#define M_SPLINE_C_INTERP    0x040
  1409. X#define M_TEXT_NORMAL        0x080
  1410. X#define M_TEXT_HIDDEN        0x100
  1411. X#define M_ARC            0x200
  1412. X#define M_ELLIPSE        0x400
  1413. X#define M_COMPOUND        0x800
  1414. X
  1415. X#define M_TEXT        (M_TEXT_HIDDEN | M_TEXT_NORMAL)
  1416. X#define M_SPLINE_O    (M_SPLINE_O_NORMAL | M_SPLINE_O_INTERP)
  1417. X#define M_SPLINE_C    (M_SPLINE_C_NORMAL | M_SPLINE_C_INTERP)
  1418. X#define M_SPLINE_NORMAL (M_SPLINE_O_NORMAL | M_SPLINE_C_NORMAL)
  1419. X#define M_SPLINE_INTERP (M_SPLINE_O_INTERP | M_SPLINE_C_INTERP)
  1420. X#define M_SPLINE    (M_SPLINE_NORMAL | M_SPLINE_INTERP)
  1421. X#define M_POLYLINE    (M_POLYLINE_LINE | M_POLYLINE_POLYGON | M_POLYLINE_BOX)
  1422. X#define M_VARPTS_OBJECT (M_POLYLINE_LINE | M_POLYLINE_POLYGON | M_SPLINE)
  1423. X#define M_OPEN_OBJECT    (M_POLYLINE_LINE | M_SPLINE_O | M_ARC)
  1424. X#define M_ROTATE_ANGLE    (M_VARPTS_OBJECT | M_ARC | M_TEXT | M_COMPOUND | M_ELLIPSE)
  1425. X#define M_ELLTEXTANGLE    (M_ELLIPSE | M_TEXT)
  1426. X#define M_OBJECT    (M_ELLIPSE | M_POLYLINE | M_SPLINE | M_TEXT | M_ARC)
  1427. X#define M_NO_TEXT    (M_ELLIPSE | M_POLYLINE | M_SPLINE | M_COMPOUND | M_ARC)
  1428. X#define M_ALL        (M_OBJECT | M_COMPOUND)
  1429. X
  1430. X/************************  Objects  **********************/
  1431. X
  1432. Xextern F_compound objects;
  1433. X
  1434. X/************  global working pointers ************/
  1435. X
  1436. Xextern F_line  *cur_l, *new_l, *old_l;
  1437. Xextern F_arc   *cur_a, *new_a, *old_a;
  1438. Xextern F_ellipse *cur_e, *new_e, *old_e;
  1439. Xextern F_text  *cur_t, *new_t, *old_t;
  1440. Xextern F_spline *cur_s, *new_s, *old_s;
  1441. Xextern F_compound *cur_c, *new_c, *old_c;
  1442. Xextern F_point *first_point, *cur_point;
  1443. Xextern F_linkinfo *cur_links;
  1444. X
  1445. X/*************** object attribute settings ***********/
  1446. X
  1447. X/*  Lines  */
  1448. Xextern int    cur_linewidth;
  1449. Xextern int    cur_linestyle;
  1450. Xextern float    cur_dashlength;
  1451. Xextern float    cur_dotgap;
  1452. Xextern float    cur_styleval;
  1453. Xextern int    pen_size;
  1454. Xextern int    pen_type;
  1455. Xextern Color    cur_color;
  1456. Xextern int    cur_boxradius;
  1457. Xextern int    cur_fillstyle;
  1458. Xextern int    cur_arrowmode;
  1459. X
  1460. X/* Text */
  1461. Xextern int    cur_fontsize;    /* font size */
  1462. Xextern int    cur_latex_font;
  1463. Xextern int    cur_ps_font;
  1464. Xextern int    cur_textjust;
  1465. Xextern int    cur_textflags;
  1466. X
  1467. X/* Misc */
  1468. Xextern float    cur_elltextangle;
  1469. END_OF_FILE
  1470. if test 8953 -ne `wc -c <'object.h'`; then
  1471.     echo shar: \"'object.h'\" unpacked with wrong size!
  1472. fi
  1473. # end of 'object.h'
  1474. fi
  1475. if test -f 'u_geom.c' -a "${1}" != "-c" ; then 
  1476.   echo shar: Will not clobber existing file \"'u_geom.c'\"
  1477. else
  1478. echo shar: Extracting \"'u_geom.c'\" \(9088 characters\)
  1479. sed "s/^X//" >'u_geom.c' <<'END_OF_FILE'
  1480. X/*
  1481. X * FIG : Facility for Interactive Generation of figures
  1482. X * Copyright (c) 1985 by Supoj Sutanthavibul
  1483. X *
  1484. X * "Permission to use, copy, modify, distribute, and sell this software and its
  1485. X * documentation for any purpose is hereby granted without fee, provided that
  1486. X * the above copyright notice appear in all copies and that both the copyright
  1487. X * notice and this permission notice appear in supporting documentation. 
  1488. X * No representations are made about the suitability of this software for 
  1489. X * any purpose.  It is provided "as is" without express or implied warranty."
  1490. X */
  1491. X
  1492. X/*
  1493. X * Routines dealing with geometry under the following headings:
  1494. X *    COMPUTE NORMAL, CLOSE TO VECTOR, COMPUTE ARC CENTER,
  1495. X *    COMPUTE ANGLE, COMPUTE DIRECTION, LATEX LINE ROUTINES.
  1496. X */
  1497. X
  1498. X#include "fig.h"
  1499. X#include "resources.h"
  1500. X#include "object.h"
  1501. X
  1502. X/*************************** COMPUTE NORMAL **********************
  1503. X
  1504. XInput arguments :
  1505. X    (x1,y1)(x2,y2) : the vector
  1506. X    direction : direction of the normal vector to (x1,y1)(x2,y2)
  1507. XOutput arguments :
  1508. X    (*x,*y)(x2,y2) : a normal vector.
  1509. XReturn value : none
  1510. X
  1511. X******************************************************************/
  1512. X
  1513. Xcompute_normal(x1, y1, x2, y2, direction, x, y)
  1514. X    float        x1, y1;
  1515. X    int            x2, y2, direction, *x, *y;
  1516. X{
  1517. X    if (direction) {        /* counter clockwise  */
  1518. X    *x = round(x2 - (y2 - y1));
  1519. X    *y = round(y2 - (x1 - x2));
  1520. X    } else {
  1521. X    *x = round(x2 + (y2 - y1));
  1522. X    *y = round(y2 + (x1 - x2));
  1523. X    }
  1524. X}
  1525. X
  1526. X/******************** CLOSE TO VECTOR **************************
  1527. X
  1528. XInput arguments:
  1529. X    (x1,y1)(x2,y2) : the vector
  1530. X    (xp,yp) : the point
  1531. X    d : tolerance (max. allowable distance from the point to the vector)
  1532. X    dd : d * d
  1533. XOutput arguments:
  1534. X    (*px,*py) : a point on the vector which is not far from (xp,yp)
  1535. X        by more than d. Normally the vector (*px,*py)(xp,yp)
  1536. X        is normal to vector (x1,y1)(x2,y2) except when (xp,yp)
  1537. X        is within d from (x1,y1) or (x2,y2), in which cases,
  1538. X        (*px,*py) = (x1,y1) or (x2,y2) respectively.
  1539. XReturn value :
  1540. X    0 : No point on the vector is within d from (xp, yp)
  1541. X    1 : (*px, *py) is such a point.
  1542. X
  1543. X******************************************************************/
  1544. X
  1545. Xclose_to_vector(x1, y1, x2, y2, xp, yp, d, dd, px, py)
  1546. X    int            x1, y1, x2, y2, xp, yp, d;
  1547. X    float        dd;
  1548. X    int           *px, *py;
  1549. X{
  1550. X    int            xmin, ymin, xmax, ymax;
  1551. X    float        x, y, slope, D2, dx, dy;
  1552. X
  1553. X    if (abs(xp - x1) <= d && abs(yp - y1) <= d) {
  1554. X    *px = x1;
  1555. X    *py = y1;
  1556. X    return (1);
  1557. X    }
  1558. X    if (abs(xp - x2) <= d && abs(yp - y2) <= d) {
  1559. X    *px = x2;
  1560. X    *py = y2;
  1561. X    return (1);
  1562. X    }
  1563. X    if (x1 < x2) {
  1564. X    xmin = x1 - d;
  1565. X    xmax = x2 + d;
  1566. X    } else {
  1567. X    xmin = x2 - d;
  1568. X    xmax = x1 + d;
  1569. X    }
  1570. X    if (xp < xmin || xmax < xp)
  1571. X    return (0);
  1572. X
  1573. X    if (y1 < y2) {
  1574. X    ymin = y1 - d;
  1575. X    ymax = y2 + d;
  1576. X    } else {
  1577. X    ymin = y2 - d;
  1578. X    ymax = y1 + d;
  1579. X    }
  1580. X    if (yp < ymin || ymax < yp)
  1581. X    return (0);
  1582. X
  1583. X    if (x2 == x1) {
  1584. X    x = x1;
  1585. X    y = yp;
  1586. X    } else if (y1 == y2) {
  1587. X    x = xp;
  1588. X    y = y1;
  1589. X    } else {
  1590. X    slope = ((float) (x2 - x1)) / ((float) (y2 - y1));
  1591. X    y = (slope * (xp - x1 + slope * y1) + yp) / (1 + slope * slope);
  1592. X    x = ((float) x1) + slope * (y - y1);
  1593. X    }
  1594. X    dx = ((float) xp) - x;
  1595. X    dy = ((float) yp) - y;
  1596. X    D2 = dx * dx + dy * dy;
  1597. X    if (D2 < dd) {
  1598. X    *px = (int) (x + .5);
  1599. X    *py = (int) (y + .5);
  1600. X    return (1);
  1601. X    }
  1602. X    return (0);
  1603. X}
  1604. X
  1605. X/********************* COMPUTE ARC CENTER ******************
  1606. X
  1607. XInput arguments :
  1608. X    p1, p2, p3 : 3 points on the arc
  1609. XOutput arguments :
  1610. X    (*x,*y) : Center of the arc
  1611. XReturn value :
  1612. X    0 : if p1, p2, p3 are co-linear.
  1613. X    1 : if they are not.
  1614. X
  1615. X*************************************************************/
  1616. X
  1617. Xint
  1618. Xcompute_arccenter(p1, p2, p3, x, y)
  1619. X    F_pos        p1, p2, p3;
  1620. X    float       *x, *y;
  1621. X{
  1622. X    float        s12, s13, len1, len2, len3, dx12, dy12, dx13, dy13;
  1623. X
  1624. X    if (p1.x == p3.x && p1.y == p3.y)
  1625. X    return 0;
  1626. X
  1627. X    dx12 = p1.x - p2.x;
  1628. X    dy12 = p1.y - p2.y;
  1629. X    dx13 = p1.x - p3.x;
  1630. X    dy13 = p1.y - p3.y;
  1631. X
  1632. X    s12 = asin((double) (dy12 / sqrt((double) (dx12 * dx12 + dy12 * dy12))));
  1633. X    s13 = asin((double) (dy13 / sqrt((double) (dx13 * dx13 + dy13 * dy13))));
  1634. X    if (fabs(s12 - s13) < .01)
  1635. X    return 0;
  1636. X
  1637. X    len1 = p1.x * p1.x + p1.y * p1.y;
  1638. X    len2 = p2.x * p2.x + p2.y * p2.y;
  1639. X    len3 = p3.x * p3.x + p3.y * p3.y;
  1640. X    *y = (dx12 * (len3 - len1) - dx13 * (len2 - len1)) /
  1641. X    (2 * (dx13 * dy12 - dx12 * dy13));
  1642. X    if (p1.x != p3.x)
  1643. X    *x = (len3 + 2 * (*y) * dy13 - len1) / (2 * (-dx13));
  1644. X    else
  1645. X    *x = (len2 + 2 * (*y) * dy12 - len1) / (2 * (-dx12));
  1646. X    return 1;
  1647. X}
  1648. X
  1649. X/********************* COMPUTE ANGLE ************************
  1650. X
  1651. XInput arguments :
  1652. X    (dx,dy) : the vector (0,0)(dx,dy)
  1653. XOutput arguments : none
  1654. XReturn value : the angle of the vector in the range [0, 2PI)
  1655. X
  1656. X*************************************************************/
  1657. X
  1658. Xfloat
  1659. Xcompute_angle(dx, dy)        /* compute the angle between 0 to 2PI  */
  1660. X    float        dx, dy;
  1661. X{
  1662. X    float        alpha;
  1663. X
  1664. X    if (dx == 0) {
  1665. X    if (dy > 0)
  1666. X        alpha = M_PI_2;
  1667. X    else
  1668. X        alpha = 3 * M_PI_2;
  1669. X    } else if (dy == 0) {
  1670. X    if (dx > 0)
  1671. X        alpha = 0;
  1672. X    else
  1673. X        alpha = M_PI;
  1674. X    } else {
  1675. X    alpha = atan((double) (dy / dx));    /* range = -PI/2 to PI/2 */
  1676. X    if (dx < 0)
  1677. X        alpha += M_PI;
  1678. X    else if (dy < 0)
  1679. X        alpha += M_2PI;
  1680. X    }
  1681. X    return (alpha);
  1682. X}
  1683. X
  1684. X
  1685. X/********************* COMPUTE DIRECTION ********************
  1686. X
  1687. XInput arguments :
  1688. X    p1, p2, p3 : 3 points of an arc with p1 the first and p3 the last.
  1689. XOutput arguments : none
  1690. XReturn value :
  1691. X    0 : if the arc passes p1, p2 and p3 (in that order) in
  1692. X        clockwise direction
  1693. X    1 : if direction is counterclockwise
  1694. X
  1695. X*************************************************************/
  1696. X
  1697. Xint
  1698. Xcompute_direction(p1, p2, p3)
  1699. X    F_pos        p1, p2, p3;
  1700. X{
  1701. X    float        diff, dx, dy, alpha, theta;
  1702. X
  1703. X    dx = p2.x - p1.x;
  1704. X    dy = p1.y - p2.y;        /* because origin of the screen is on the
  1705. X                 * upper left corner */
  1706. X
  1707. X    alpha = compute_angle(dx, dy);
  1708. X
  1709. X    dx = p3.x - p2.x;
  1710. X    dy = p2.y - p3.y;
  1711. X    theta = compute_angle(dx, dy);
  1712. X
  1713. X    diff = theta - alpha;
  1714. X    if ((0 < diff && diff < M_PI) || diff < -M_PI) {
  1715. X    return (1);        /* counterclockwise */
  1716. X    }
  1717. X    return (0);            /* clockwise */
  1718. X}
  1719. X
  1720. X/*********************** LATEX LINE ROUTINES ***************************/
  1721. X
  1722. Xint
  1723. Xpgcd(a, b)
  1724. X    int            a, b;
  1725. X
  1726. X/*
  1727. X * compute greatest common divisor, assuming 0 < a <= b
  1728. X */
  1729. X{
  1730. X    b = b % a;
  1731. X    return (b) ? gcd(b, a) : a;
  1732. X}
  1733. X
  1734. Xint
  1735. Xgcd(a, b)
  1736. X    int            a, b;
  1737. X
  1738. X/*
  1739. X * compute greatest common divisor
  1740. X */
  1741. X{
  1742. X    if (a < 0)
  1743. X    a = -a;
  1744. X    if (b < 0)
  1745. X    b = -b;
  1746. X    return (a <= b) ? pgcd(a, b) : pgcd(b, a);
  1747. X}
  1748. X
  1749. X
  1750. Xint
  1751. Xlcm(a, b)
  1752. X    int            a, b;
  1753. X
  1754. X/*
  1755. X * compute least common multiple
  1756. X */
  1757. X{
  1758. X    return abs(a * b) / gcd(a, b);
  1759. X}
  1760. X
  1761. X
  1762. Xdouble        rad2deg = 57.295779513082320877;
  1763. X
  1764. Xstruct angle_table {
  1765. X    int            x, y;
  1766. X    double        angle;
  1767. X};
  1768. X
  1769. Xstruct angle_table line_angles[25] =
  1770. X{{0, 1, 90.0},
  1771. X{1, 0, 0.0},
  1772. X{1, 1, 45.0},
  1773. X{1, 2, 63.434948822922010648},
  1774. X{1, 3, 71.565051177077989351},
  1775. X{1, 4, 75.963756532073521417},
  1776. X{1, 5, 78.690067525979786913},
  1777. X{1, 6, 80.537677791974382609},
  1778. X{2, 1, 26.565051177077989351},
  1779. X{2, 3, 56.309932474020213086},
  1780. X{2, 5, 68.198590513648188229},
  1781. X{3, 1, 18.434948822922010648},
  1782. X{3, 2, 33.690067525979786913},
  1783. X{3, 4, 53.130102354155978703},
  1784. X{3, 5, 59.036243467926478582},
  1785. X{4, 1, 14.036243467926478588},
  1786. X{4, 3, 36.869897645844021297},
  1787. X{4, 5, 51.340191745909909396},
  1788. X{5, 1, 11.309932474020213086},
  1789. X{5, 2, 21.801409486351811770},
  1790. X{5, 3, 30.963756532073521417},
  1791. X{5, 4, 38.659808254090090604},
  1792. X{5, 6, 50.194428907734805993},
  1793. X{6, 1, 9.4623222080256173906},
  1794. X{6, 5, 39.805571092265194006}
  1795. X};
  1796. X
  1797. Xstruct angle_table arrow_angles[13] =
  1798. X{{0, 1, 90.0},
  1799. X{1, 0, 0.0},
  1800. X{1, 1, 45.0},
  1801. X{1, 2, 63.434948822922010648},
  1802. X{1, 3, 71.565051177077989351},
  1803. X{1, 4, 75.963756532073521417},
  1804. X{2, 1, 26.565051177077989351},
  1805. X{2, 3, 56.309932474020213086},
  1806. X{3, 1, 18.434948822922010648},
  1807. X{3, 2, 33.690067525979786913},
  1808. X{3, 4, 53.130102354155978703},
  1809. X{4, 1, 14.036243467926478588},
  1810. X{4, 3, 36.869897645844021297},
  1811. X};
  1812. X
  1813. Xget_slope(dx, dy, sxp, syp, arrow)
  1814. X    int            dx, dy, *sxp, *syp, arrow;
  1815. X{
  1816. X    double        angle;
  1817. X    int            i, s, max;
  1818. X    double        d, d1;
  1819. X    struct angle_table *st;
  1820. X
  1821. X    if (dx == 0) {
  1822. X    *sxp = 0;
  1823. X    *syp = signof(dy);
  1824. X    return;
  1825. X    }
  1826. X    angle = atan((double) abs(dy) / (double) abs(dx)) * rad2deg;
  1827. X    if (arrow) {
  1828. X    st = arrow_angles;
  1829. X    max = 13;
  1830. X    } else {
  1831. X    st = line_angles;
  1832. X    max = 25;
  1833. X    }
  1834. X    s = 0;
  1835. X    d = 9.9e9;
  1836. X    for (i = 0; i < max; i++) {
  1837. X    d1 = fabs(angle - st[i].angle);
  1838. X    if (d1 < d) {
  1839. X        s = i;
  1840. X        d = d1;
  1841. X    }
  1842. X    }
  1843. X    *sxp = st[s].x;
  1844. X    if (dx < 0)
  1845. X    *sxp = -*sxp;
  1846. X    *syp = st[s].y;
  1847. X    if (dy < 0)
  1848. X    *syp = -*syp;
  1849. X}
  1850. X
  1851. Xlatex_endpoint(x1, y1, x2, y2, xout, yout, arrow, magnet)
  1852. X    int            x1, y1, x2, y2;
  1853. X    int           *xout, *yout;
  1854. X    int            arrow, magnet;
  1855. X{
  1856. X    int            dx, dy, sx, sy, ds, dsx, dsy;
  1857. X
  1858. X    dx = x2 - x1;
  1859. X    dy = y2 - y1;
  1860. X    get_slope(dx, dy, &sx, &sy, arrow);
  1861. X    if (abs(sx) >= abs(sy)) {
  1862. X    ds = lcm(sx, magnet * gcd(sx, magnet));
  1863. X    dsx = (2 * abs(dx) / ds + 1) / 2;
  1864. X    dsx = (dx >= 0) ? dsx * ds : -dsx * ds;
  1865. X    *xout = x1 + dsx;
  1866. X    *yout = y1 + dsx * sy / sx;
  1867. X    } else {
  1868. X    ds = lcm(sy, magnet * gcd(sy, magnet));
  1869. X    dsy = (2 * abs(dy) / ds + 1) / 2;
  1870. X    dsy = (dy >= 0) ? dsy * ds : -dsy * ds;
  1871. X    *yout = y1 + dsy;
  1872. X    *xout = x1 + dsy * sx / sy;
  1873. X    }
  1874. X}
  1875. END_OF_FILE
  1876. if test 9088 -ne `wc -c <'u_geom.c'`; then
  1877.     echo shar: \"'u_geom.c'\" unpacked with wrong size!
  1878. fi
  1879. # end of 'u_geom.c'
  1880. fi
  1881. echo shar: End of archive 7 \(of 27\).
  1882. cp /dev/null ark7isdone
  1883. MISSING=""
  1884. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ; do
  1885.     if test ! -f ark${I}isdone ; then
  1886.     MISSING="${MISSING} ${I}"
  1887.     fi
  1888. done
  1889. if test "${MISSING}" = "" ; then
  1890.     echo You have unpacked all 27 archives.
  1891.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1892. else
  1893.     echo You still need to unpack the following archives:
  1894.     echo "        " ${MISSING}
  1895. fi
  1896. ##  End of shell archive.
  1897. exit 0
  1898.  
  1899. exit 0 # Just in case...
  1900. -- 
  1901.   // chris@IMD.Sterling.COM       | Send comp.sources.x submissions to:
  1902. \X/  Amiga - The only way to fly! |    sources-x@imd.sterling.com
  1903.  "It's intuitively obvious to the |
  1904.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1905.