CSUF LogoCSUF Site Navigation
optics.csufresno.edu

FC6 Drawing & Image Manipulation Programs Tgif

Department of Electrical and Computer Engineering
Assistant Professor Gregory R. Kriehn
Forums
Wiki
FC6 Tgif
Tgif is another 2-D drawing program that runs using the X11 library on Linux and most Unix platforms. Although becoming dated, it is still a nice program to use in that it allows you to embed LaTeX code within a picture, provides an easy way of creating primitive objects such as rectangles, ovals, rounded-corner rectangles, arcs, polylines, polygons, open-splines, closed-splines, text, X11 bitmaps, and encapsulated postscript, and it can actually save pictures that are created with the program to postscript and encapsulated postscript.

To install the program, go to the Tgif homepage:

http://bourbon.usc.edu/tgif/index.html

Click on the Download link, and scroll down to the Anonymous FTP Sites for Tgif Binaries section. Click on the Version 4.1 Patchlevel 45 Binary link, which will download tgif-4.1.45-1.i386.rpm.

Change into the Desktop directory:

~> cd ~/Desktop
and install the rpm:
~> sudo rpm -vhi tgif-4.1.45-1.i386.rpm
You should see the rpm successfully install:
Preparing...                ########################################### [100%]
   1:tgif                   ########################################### [100%]
When finished, source your ~/.tcshrc file:
~> source ~/.tcshrc
and launch tgif:
~> tgif &
Preferences for tgif are also set in the ~/.Xresources file, similar to idraw. I use the following options:
!## Tgif Preferences
Tgif.UsePsAdobeString: 3.0/3.0
Tgif.Geometry: 800x800+0+0
Tgif.InitialFont:              Times
Tgif.InitialFontStyle:         Roman
Tgif.PSA4PaperSize:            false
Tgif.InitialPaperSize:         8.5in x 11in
Tgif.DefaultEPSScaling:        1.7778  <-- good for letter
Tgif.gifViewer:                xv %s
Tgif.XpmToGif: xpmtoppm %s | ppmtogif | giftrans -t gray75

Tgif.MaxImportFilters: 4
Tgif.ImportFilter0: GIF-dither gif giftopnm %s | ppmdither | ppmtoxpm
Tgif.ImportFilter1: GIF gif giftopnm %s | ppmquant 222 | ppmtoxpm
Tgif.ImportFilter2: JPEG-dither jpg;jpeg \n\
       djpeg -gif %s | giftopnm | ppmdither | ppmtoxpm
Tgif.ImportFilter3: JPEG jpg;jpeg \n\
       djpeg -gif -colors 222 %s | giftopnm | ppmtoxpm
Save and exit, and use xrdb once again to load the preferences into memory:
~> xrdb ~/.Xresources
For help with additional preferences, simply read the man page.