home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / x / 16424 < prev    next >
Encoding:
Text File  |  1992-09-09  |  7.6 KB  |  185 lines

  1. Path: sparky!uunet!wupost!darwin.sura.net!spool.mu.edu!sdd.hp.com!hplabs!ucbvax!bloom-beacon!INTERNET!dont-send-mail-to-path-lines
  2. From: KOSU_MATSB@routh.kosufy.lu.se
  3. Newsgroups: comp.windows.x
  4. Subject: Announcing: TGIFCRTL (RTL to make TGIF files).
  5. Message-ID: <9209091541.AA23755@expo.lcs.mit.edu>
  6. Date: 9 Sep 92 15:41:41 GMT
  7. Sender: daemon@athena.mit.edu (Mr Background)
  8. Organization: The Internet
  9. Lines: 174
  10.  
  11. ANNOUNCING:
  12.  
  13.                                 TGIFCRTL
  14.           a Run-Time Library in C to produce TGIF object files.
  15.  
  16.                                  Ver 1.1
  17.  
  18. AUTHOR:
  19.     Mats Bergstr"om, University of Lund, Sweden.
  20.     mats.bergstrom@kosufy.lu.se
  21.  
  22.  
  23.  
  24. ABSTRACT:
  25.     In many types of plots, machine created data is essential, yet the
  26.     need for free hand editing is needed. TGIFCRTL is a small and simple
  27.     run-time library written in ANSI-C to create plots readable by the
  28.     TGIF programme. The programme TGIF is an interactive X-windows based
  29.     drawing programme created by William Chia-Wei Cheng. 
  30.  
  31.  
  32.  
  33. LOCATION:
  34.     TGIFCRTL has been made available for anonymous ftp by William Cheng
  35.     on the locations:
  36.  
  37.         cs.ucla.edu:/pub/tgif/TGIFCRTL/*
  38.         rye.cs.ucla.edu:/pub/tgif/TGIFCRTL/*
  39.  
  40.  
  41.  
  42. CONTENTS:
  43.     TGIFCRTL.h          Header file for the library. (507 lines).
  44.     TGIFCRTL.c          Source code. (874 lines).
  45.     TGIFCRTL.license    License. *READ*IT*!
  46.     TGIFCRTL.README     This file.
  47.     TGIFCRTL-TEST.c     Simple test file.
  48.  
  49.  
  50.  
  51. COMPILATION:
  52.     Try Your favourite C-compiler:
  53.         "cc -c TGIFCRTL.c" on Un*x like machines
  54.         "CC TGIFCRTL" and "GCC TGIFCRTL" works on VMS.
  55.  
  56.     The library compiles successfully under the following circumstances:
  57.  
  58.     VAX/VMS V5.4-1        VAX C V3.0-031  (with \STANDARD=PORTABLE option)
  59.     VAX/VMS V5.4-1        GNU GCC V2.2.2  (both with C an C++ options)
  60.     ULTRIX V4.2 (Rev. 96) ULTRIX RISC C
  61.  
  62.     There should be no problem in compiling this library under UNIX.
  63.  
  64.  
  65.  
  66. HISTORY:
  67.     The TGIFCRTL was created after a number of frustrated and unsuccessful
  68.     attempts to import claimed encapsulated PostScript files, created by
  69.     various WYSIWYG PC tools, into LaTeX documents. As i had good
  70.     experience with TGIF and the object files describing pictures used by
  71.     TGIF are (fairly) simple ASCII text files, the TGIFCRTL was written as
  72.     a solution to the problem. William Cheng answered may of my questions
  73.     in a friendly, prompt and most enlightening way. I don't think i would
  74.     have been able to finish it in twice the time without his help,
  75.     *Thanks*!!!
  76.  
  77.  
  78.  
  79. KNOWN PROBLEMS:
  80.     Since TGIFCRTL does not involve any X-window routines, the text
  81.     bounding boxes are faked. The same is true with a few other text
  82.     attributes. This is no problem _as_long_as_the_file_is_read_by_TGIF_ 
  83.     since TGIF will recalculate these attributes. PRTGIF, however,
  84.     *relies* on these values and may not perform correct. The solution is
  85.     to read the file with TGIF, write it back immediately and then use
  86.     PRTGIF (or even faster: print from within TGIF ;-).
  87.  
  88.     The page space upon which TGIFCRTL plots is restricted to the
  89.     smallest common size of A4 and it's American cousin covers.
  90.  
  91.     If a polyline of polygon have vertices too close on a (supposed) 
  92.     smooth curve it may look crooked since the resolution is 5/mm (256/"),
  93.     either recalculate with longer distances or delete points by hand.
  94.  
  95.     Please bare in mind that i wrote this in my spare time, THERE IS NO
  96.     WARRANTY WHAT SO EVER (read the license!).
  97.     If You find a bug, please drop me a note describing the problem.
  98.     I'll try to correct it, if and when i can find time for a next version.
  99.  
  100.  
  101. USAGE:
  102.     The library supports all TGIF objects *except* arcs (will come in next
  103.     version though). In addition to these a special MARKER object can be
  104.     drawn. This is a composed object used for marking a position on a
  105.     curve etc. Currently there are two types of markers available: CIRCLE
  106.     and SQUARE. 
  107.  
  108.     The graphical objects are divided into four classes: open (polyline), 
  109.     closed (box, oval, rcbox), text and marker. Each of these have a 
  110.     separate graphic state. The graphic state determines line width, line 
  111.     type, fill pattern, text font, marker type etc., for an object to be 
  112.     written on the output file. The header file "TGIFCRTL.h" defines 
  113.     macros for each of the possible parameter values in the "TRset_xxx" 
  114.     functions. If a parameter value is replace by the macro "IGNORE" the 
  115.     corresponding parameter is ignored and not set.
  116.  
  117.     The library sets no restriction in number of output files open 
  118.     simultaneously.
  119.  
  120.     The library functions may be divided into three types:
  121.     i,   Basic functions such as open and close an output file.
  122.     ii,  Control functions to set graphic states and transformation.
  123.     iv,  Drawing functions to draw objects.
  124.  
  125.     All function identifiers use the prefix "TR" (for TgifcRtl) and all
  126.     but "TRopen" have "TR_FILE *tp" as first argument.
  127.  
  128.  
  129.  
  130. LIST OF FUNCTIONS:
  131.     TRopen                  Open a new output file.
  132.     TRclose                 Close an output file.
  133.     TRerr                   Report Error status (not fully implemented).
  134.  
  135.     TRset_htrans            Set horizontal transformation.
  136.     TRset_vtrans            Set vertical transformation.
  137.     TRhtrans                Return horiz. paper coordinate.
  138.     TRvtrans                Return vert. paper coordinate.
  139.     TRhmm                   Transform x to x horizonal mm's
  140.     TRvmm                   Transform x to x vertical mm's
  141.     TRhdot                  Transform x to horizonal dots
  142.     TRvdot                  Transform x to vertical dots
  143.  
  144.     TRset_default           Set default graphics states and 
  145.     TRset_open_line         Set graphic state for open shapes.
  146.     TRset_open_fill         Set graphic state for open shapes.
  147.     TRset_open_arrow        Set graphic state for open shapes.
  148.     TRset_closed_line       Set Graphic state for closed shapes.
  149.     TRset_closed_fill       Set Graphic state for closed shapes.
  150.     TRset_closed_rc         Set Graphic state for closed shapes.
  151.     TRset_text_text         Set graphic state for text.
  152.     TRset_text_fill         Set graphic state for text.
  153.     TRset_mark_mark         Set Graphic state for Markers.
  154.     TRset_mark_line         Set Graphic state for Markers.  
  155.     TRset_mark_fill         Set Graphic state for Markers.
  156.     TRset_mark_arrow        Set Graphic state for Markers.
  157.     TRset_mark_text         Set Graphic state for Markers.
  158.     TRset_lock              Objects are locked.
  159.     TRset_unlock            Objects are unlocked.
  160.     TRpush                  Push/Pop the current graphics state
  161.     TRpop                   on the graphics stack.
  162.  
  163.     TRpolyline              Write a poly line.
  164.     TRpolygon               Write a polygon         
  165.     TRoval                  Write oval.     
  166.     TRbox                   Write box.      
  167.     TRrcbox                 Write rounded-corner box.
  168.     TRtext                  Write text.
  169.     TRline                  Draw a single line element
  170.     TRmark                  Draw a marker at position.
  171.     TRpolymark              Mark may positions.
  172.  
  173.     TRgroup_begin           Begin a group object.
  174.     TRgroup_end             End a group object.
  175.  
  176.  
  177.             Sincerely/Mats Bergstr"om.
  178.  -----------------------------------  -----------------------------------
  179.  Mats Bergstrvm                       mats.bergstrom@kosufy.lu.se
  180.  Div of Cosmic and Subatomic Physics  kosu_matsb@130.235.92.17
  181.  Department of Physics                ROUTH::KOSU_MATSB (ROUTH::=57412::)
  182.  University of Lund                   Phone: (+46)104767
  183.  SWEDEN.                              Fax:   (+46)104709
  184.  -----------------------------------  -----------------------------------
  185.