Introduction to figEdit
[Introduction to figPac | figPac API ]
Introduction to figEdit
figEdit is a crude "point and click" interface to figPac. The user
specifies the figure size, name and so on by typing them into text
windows. Then the user builds up the figure by selecting various
figure elements from a menu, possibly specifying various parameters
for each figure element either by typing them into text windows
or by moving sliders or by clicking on a point on the figure itself.
Finally, the user saves the figure. This produces a .java file. If the
figure name was myfig, the .java file will be named myfig.java. One may
then compile using the command
javac myfig.java
If you want a PostScript version of the figure you would then execute myfig
as an application using
java myfig
If you want a screen image of the figure you would create an .html file
named myfig.html and containing a line like
<applet code="myfig.class" width=600 height=600></applet>
and execute
appletviewer myfig.html &
To start figEdit, one issues the command
java figPac.figEdit &
To save typing I use the alias
alias figEdit 'java figPac.figEdit \!* &'
on unix systems and a similar program named figEdit.bat on DOS systems.
figEdit starts up by popping open a window that contains a large blank
graphics screen in the upper left corner. Underneath the graphics screen
there is a blank "help" text area and to the right there is a window, called the
Setup window, containing
a number of buttons and text input areas. All of the text input areas
contain default values. The user edits the default values
to specify the desired
- figure name
- horizontal size in inches, called xsize
- vertical size in inches, called ysize
- the range of x (i.e. horizontal) coordinates, called xmin and xmax
- the range of y (i.e. vertical) coordinates, called ymin and ymax
- snap-to precision. This requires some explanation. It is very common to
specify a point of the figure by clicking the mouse on some point of
the graphics screen. The x and y coordinates of the point clicked on
are invariably not round numbers. If the snap-to precision is, for
example, 2, then the x and y coordinates are rounded to 2 decimal places.
If the snap-to precision is 0, then the x and y coordinates are rounded
to the nearest integer. If the snap-to precision is, for example, -2,
then the x and y coordinates are rounded to the nearest integer multiple
of 100.
To save (or discard) the values of these parameters, click one of the buttons
of the Setup window.
- Clicking the button "apply", saves the values.
- Clicking the button "apply+dismiss", saves the values and closes
the Setup window.
- Clicking the button "dismiss", closes the Setup window without saving the values.
You can later change the values of these setup parameters by selecting "Setup"
from the "file" menu. This reopens the Setup window.
Now the user builds up the figure by adding figure elements. To do so, select a figure element from the "Append" menu. For example, to add a line segment, select "fLine". This opens an fOpen window where the Setup window used to
be. Now just follow the instructions in the text window below the graphics
screen.
When you are done, save the figure by selecting "Save" from the "File"
menu and quit by selecting "Quit" from the "file" menu.
[Introduction to figPac | figPac API ]