File: README.fig

package info (click to toggle)
plotutils 2.0-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 5,964 kB
  • ctags: 2,522
  • sloc: ansic: 38,416; sh: 1,853; yacc: 856; makefile: 181; lex: 144
file content (38 lines) | stat: -rw-r--r-- 1,797 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
These are some comments on the interface provided by GNU libplot to the
xfig drawing editor.

You might think that the order in which objects appear in an xfig-format
output file would determine the order in which they are drawn on an xfig
display.  This is not the case.  The list of objects in the file is not a
`display list' in the conventional sense.

This is because xfig format, at least as of xfig version 3.1, supports a
`depth' attribute for each object.  (Depth lies in the 0..999 range.)
Objects are drawn on the display as follows: first those with depth 999,
then depth 998,..., depth 0. [Depth >999 may be supported, but >999 is
apparently merged into 999; I haven't checked this.]  The objects at any
specified depth are drawn in the following order:

	arcs
	compounds
	ellipses
	lines
	splines
	texts

(The depth of a compound object is defined to be the maximum of the depths
of the objects it contains.)  At any specified depth, the objects of any
specified type are drawn in the order they appear in the file.  So to that
limited extent, the xfig file is a conventional display list.

This scheme poses some problems for our xfig device driver.  What we do is
start with depth 989 (the first object we draw will have that depth).  If
the next object drawn would be of a type that would not come before the
first object in the above order, we'll give it depth 989 also; otherwise
we'll give it depth 988 to ensure it will indeed be drawn afterwards.  And
so forth.  When we get to depth 0, we throw up our hands (depths <0 aren't
supported by xfig, so we give all further objects depth 0).

The reason we start drawing with depth 989 instead of 999 is that we want
to give the user a chance to slip some object(s) underneath the objects
we'll be plotting, by editing with xfig.