Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2001 19:17:29 -0800 (PST)
From:      papowell@astart.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/24420: Update to New Port: pic2fig
Message-ID:  <200101180317.f0I3HTf03301@h114.private>

next in thread | raw e-mail | index | archive | help

>Number:         24420
>Category:       ports
>Synopsis:       Update to New Port: pic2fig
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 17 19:20:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Powell <papowell@astart.com>
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
Astart Technologies
>Environment:

FreeBSD 4.2

>Description:

	Fixed up the fig2ps so that it handled more of the PIC
stuff...  I hate figures... Hatum!  Hatum!  Bad!  Sigh...

  Patrick ("the only drafting I wanted to do was with a beer") Powell

>How-To-Repeat:

	Wonder where the dotted lines disappeared in legacy/antique/vintage
  documentation.

>Fix:


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pic2fig
#	pic2fig/Makefile
#	pic2fig/pkg-comment
#	pic2fig/pkg-descr
#	pic2fig/pkg-plist
#	pic2fig/distinfo
#	pic2fig/patch-ab
#	pic2fig/patch-ai
#	pic2fig/patch-ah
#	pic2fig/patch-ag
#	pic2fig/patch-af
#	pic2fig/patch-ae
#	pic2fig/patch-ad
#	pic2fig/patch-ac
#	pic2fig/patch-aa
#
echo c - pic2fig
mkdir -p pic2fig > /dev/null 2>&1
echo x - pic2fig/Makefile
sed 's/^X//' >pic2fig/Makefile << 'END-of-pic2fig/Makefile'
X# New ports collection makefile for:    pic2fig
X# Date created:         14 Jan 2001
X# Whom:                 Patrick Powell <papowell@astart.com>
X#
X#
X
XPORTNAME=	pic2fig
XPORTVERSION=	1.4
XPORTREVISION=   2
XCATEGORIES=	print
XMASTER_SITES=	ftp://ftp.x.org/contrib/utilities/
XEXTRACT_SUFX=       .tar.Z
XWRKSRC=${WRKDIR}/${PORTNAME}
XPATCHDIR=${MASTERDIR}
X
XMAINTAINER= Patrick Powell <papowell@astart.com>
X
XMAN1=		pic2fig.1
X
Xdo-install:
X	${INSTALL_PROGRAM} -m 755 ${WRKSRC}/pic2fig ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKSRC}/pic2fig.1 ${PREFIX}/man/man1
X
X.include <bsd.port.mk>
END-of-pic2fig/Makefile
echo x - pic2fig/pkg-comment
sed 's/^X//' >pic2fig/pkg-comment << 'END-of-pic2fig/pkg-comment'
XPic format to fig format converter
END-of-pic2fig/pkg-comment
echo x - pic2fig/pkg-descr
sed 's/^X//' >pic2fig/pkg-descr << 'END-of-pic2fig/pkg-descr'
XPic2fig is a pic(l) preprocessor for drawing simple figures in Fig code.
XThe basic objects are box, line, arrow, circle, ellipse, arc and text.
X
XWhen  pic2fig  is  executed, it produces an output file in the
Xcurrent directory.  The name is constructed  from  the input  file's
Xname.  If the input filename ends with .pic, then that extension
Xwill be replaced by .fig.   Otherwise, .fig  is appended to the input
Xfilename.  If file does not exist, then pic2fig tries appending .pic
Xto the name.
X
XUpdated to produce FIG 3.2 format by Patrick Powell <papowell@astart.com>
X
XWeb Site: ftp://ftp.x.org/contrib/utilities/
X
XNote:  this version does not support the groff/pic 'thickness' attribute.
END-of-pic2fig/pkg-descr
echo x - pic2fig/pkg-plist
sed 's/^X//' >pic2fig/pkg-plist << 'END-of-pic2fig/pkg-plist'
Xbin/pic2fig
END-of-pic2fig/pkg-plist
echo x - pic2fig/distinfo
sed 's/^X//' >pic2fig/distinfo << 'END-of-pic2fig/distinfo'
XMD5 (pic2fig-1.4.tar.Z) = 98845b0fc9d9ad7e9484f22ef3057996
END-of-pic2fig/distinfo
echo x - pic2fig/patch-ab
sed 's/^X//' >pic2fig/patch-ab << 'END-of-pic2fig/patch-ab'
X--- FORMAT3.2.orig	Wed Jan 17 16:46:20 2001
X+++ FORMAT3.2	Wed Jan 17 16:45:56 2001
X@@ -0,0 +1,551 @@
X+/*
X+ * FIG : Facility for Interactive Generation of figures
X+ * Copyright (c) 1985 by Supoj Sutanthavibul
X+ * Parts Copyright (c) 1989-1999 by Brian V. Smith
X+ * Parts Copyright (c) 1991 by Paul King
X+ * Parts Copyright (c) 1995 by C. Blanc and C. Schlick
X+ *
X+ * The X Consortium, and any party obtaining a copy of these files from
X+ * the X Consortium, directly or indirectly, is granted, free of charge, a
X+ * full and unrestricted irrevocable, world-wide, paid up, royalty-free,
X+ * nonexclusive right and license to deal in this software and
X+ * documentation files (the "Software"), including without limitation the
X+ * rights to use, copy, modify, merge, publish, distribute, sublicense,
X+ * and/or sell copies of the Software, and to permit persons who receive
X+ * copies from any such party to do so, with the only requirement being
X+ * that this copyright notice remain intact.  This license includes without
X+ * limitation a license to do the foregoing actions under any patents of
X+ * the party supplying this software to the X Consortium.
X+ */
X+
X+The new components in protocol 3.2 are the paper size, magnification,
X+single/multiple page indicator and transparent color for GIF export in the
X+header.
X+
X+The other modification between version 3.1 and version 3.2 of the
X+protocol is the mathematical model used for splines. The new version
X+uses X-splines which allows the user to mix interpolation and approximation
X+points in a same curve. More precisely, it means that an X-spline curve
X+is neither an interpolated spline nor an approximated one, it is BOTH
X+(the behaviour of each point is controlled by one single parameter
X+called "shape factor"). For additional information about X-splines, see:
X+
X+  "X-Splines: A Spline Model Designed for the End User"
X+  by C. Blanc and C. Schlick, Proceedings of SIGGRAPH'95
X+
X+Caveat: Because spline models of previous versions (quadratic B-splines
X+and Bezier with hidden points) are no longer supported, curves that are
X+present in version 3.1 and older files are automatically converted to
X+X-splines. This translation is only an approximation process. It means
X+that the converted curves are not exactly the same as the original ones.
X+Though the translation usually provides almost identical curves, some
X+hand-fitting may be needed in some pathological cases.
X+
X+-------------------------------------------------------------------------------
X+Description of the Fig Format Follows
X+-------------------------------------------------------------------------------
X+
X+(1) The very first line is a comment line containing the name and version:
X+	#FIG 3.2
X+
X+    The character # at the first column of a line indicates that the line
X+    is a comment line which will be preserved when the Fig file is read in.
X+    The user may edit them with the popup editor.  
X+
X+    The comment line(s) must immediately precede the object to which they
X+    are associated.  In the case of the "whole figure comments" mentioned
X+    below, they immediately precede the (resolution,coord_system) line.
X+
X+(2) The first non-comment line consists of the following:
X+
X+	string	orientation		("Landscape" or "Portrait")
X+	string	justification		("Center" or "Flush Left")
X+	string	units			("Metric" or "Inches")
X+	string	papersize		("Letter", "Legal", "Ledger", "Tabloid",
X+					 "A", "B", "C", "D", "E",
X+					 "A4",   "A3", "A2", "A1", "A0" and "B5")
X+	float	magnification		(export and print magnification, %)
X+	string	multiple-page		("Single" or "Multiple" pages)
X+	int	transparent color	(color number for transparent color for GIF
X+					 export. -3=background, -2=None, -1=Default,
X+					 0-31 for standard colors or 32- for user colors)
X+	# optional comment		(An optional set of comments may be here,
X+					 which are associated with the whole figure)
X+	int	resolution coord_system	(Fig units/inch and coordinate system:
X+					   1: origin at lower left corner (NOT USED)
X+					   2: upper left)
X+
X+    Fig_resolution is the resolution of the figure in the file.
X+    Xfig will always write the file with a resolution of 1200ppi so it
X+    will scale the figure upon reading it in if its resolution is different
X+    from 1200ppi.  Pixels are assumed to be square.
X+
X+    Xfig will read the orientation string and change the canvas to match
X+    either the Landscape or Portrait mode of the figure file.
X+
X+    The units specification is self-explanatory.
X+
X+    The coordinate_system variable is ignored - the origin is ALWAYS the
X+    upper-left corner.
X+
X+    ** Coordinates are given in "fig_resolution" units.
X+    ** Line thicknesses are given in 1/80 inch (0.3175mm) or 1 screen pixel.
X+       When exporting to EPS, PostScript or any bitmap format (e.g. GIF),  the
X+       line thickness is reduced to 1/160 inch (0.159mm) to "lighten" the look.
X+    ** dash-lengths/dot-gaps are given in 80-ths of an inch.
X+
X+
X+(3) The rest of the file contains various objects.  An object can be one
X+    of six classes (or types).
X+
X+	0)	Color pseudo-object.
X+	1)	Arc.
X+	2)	Ellipse which is a generalization of circle.
X+	3)	Polyline which includes polygon and box.
X+	4)	Spline which includes 
X+		closed/open approximated/interpolated/x-spline spline.
X+	5)	Text.
X+	6)	Compound object which is composed of one or more objects.
X+
X+    In the following elaboration on object formats, every value of fig
X+    output are separated by blank characters or new line ('\n').  The
X+    value of the unused parameters will be -1.
X+
X+    Some fields are described as "enumeration type" or "bit vector"; the
X+    values which these fields can take are defined in the header file object.h.
X+    The pen_style field is unused.
X+    These values may be defined in some future version of Fig.
X+
X+    The two color fields (pen and fill; pen only, for texts) are
X+    defined as follows:
X+
X+	    -1 = Default
X+	     0 = Black
X+	     1 = Blue
X+	     2 = Green
X+	     3 = Cyan
X+	     4 = Red
X+	     5 = Magenta
X+	     6 = Yellow
X+	     7 = White
X+	  8-11 = four shades of blue (dark to lighter)
X+	 12-14 = three shades of green (dark to lighter)
X+	 15-17 = three shades of cyan (dark to lighter)
X+	 18-20 = three shades of red (dark to lighter)
X+	 21-23 = three shades of magenta (dark to lighter)
X+	 24-26 = three shades of brown (dark to lighter)
X+	 27-30 = four shades of pink (dark to lighter)
X+	    31 = Gold
X+
X+	 values from 32 to 543 (512 total) are user colors and
X+	 are defined in color pseudo-objects (type 0)
X+
X+    For WHITE color, the area fill field is defined as follows:
X+	
X+	-1 = not filled
X+	 0 = black
X+	...  values from 1 to 19 are shades of grey, from darker to lighter
X+	20 = white
X+	21-40 not used
X+	41-56 see patterns for colors, below
X+
X+    For BLACK or DEFAULT color, the area fill field is defined as follows:
X+	
X+	-1 = not filled
X+	 0 = white
X+	...  values from 1 to 19 are shades of grey, from lighter to darker
X+	20 = black
X+	21-40 not used
X+	41-56 see patterns for colors, below
X+
X+    For all other colors, the area fill field is defined as follows:
X+
X+	-1 = not filled
X+	 0 = black
X+	...  values from 1 to 19 are "shades" of the color, from darker to lighter.
X+		A shade is defined as the color mixed with black
X+	20 = full saturation of the color
X+	...  values from 21 to 39 are "tints" of the color from the color to white.
X+		A tint is defined as the color mixed with white
X+	40 = white
X+	41 = 30 degree left diagonal pattern
X+	42 = 30 degree right diagonal pattern
X+	43 = 30 degree crosshatch
X+	44 = 45 degree left diagonal pattern
X+	45 = 45 degree right diagonal pattern
X+	46 = 45 degree crosshatch
X+	47 = bricks
X+	48 = circles
X+	49 = horizontal lines
X+	50 = vertical lines
X+	51 = crosshatch
X+	52 = fish scales
X+	53 = small fish scales
X+	54 = octagons
X+	55 = horizontal "tire treads"
X+	56 = vertical "tire treads"
X+
X+    The depth field is defined as follows:
X+
X+	 0 ... 999 where larger value means object is deeper than (under)
X+		   objects with smaller depth
X+
X+    The line_style field is defined as follows:
X+
X+	-1 = Default
X+	 0 = Solid
X+	 1 = Dashed
X+	 2 = Dotted
X+	 3 = Dash-dotted
X+	 4 = Dash-double-dotted
X+	 5 = Dash-triple-dotted
X+
X+    The style_val field is defined as the length, in 1/80 inches, of the on/off
X+    dashes for dashed lines, and the distance between the dots, in 1/80 inches,
X+    for dotted lines.
X+
X+    The join_style field is defined FOR LINES only as follows:
X+
X+	 0 = Miter (the default in xfig 2.1 and earlier)
X+	 1 = Bevel
X+	 2 = Round
X+
X+    The cap_style field is defined FOR LINES, OPEN SPLINES and ARCS only as follows:
X+
X+	 0 = Butt (the default in xfig 2.1 and earlier)
X+	 1 = Round
X+	 2 = Projecting
X+
X+    The arrow_type field is defined for LINES, ARCS and OPEN SPLINES
X+    only as follows:
X+
X+	 0 = Stick-type (the default in xfig 2.1 and earlier)
X+
X+		 \
X+		    \
X+	_______________\
X+		       /
X+		    /
X+		 /
X+
X+	 1 = Closed triangle:
X+
X+		|\
X+		|   \
X+	________|      \
X+		|      /
X+		|   /
X+		|/
X+
X+	 2 = Closed with "indented" butt:
X+
X+		|\
X+		\   \
X+		 \     \
X+	__________\       \
X+		  /       /
X+		 /     /
X+		/   /
X+		|/
X+
X+	 3 = Closed with "pointed" butt:
X+
X+		   /\
X+		  /    \
X+		 /        \
X+	________/            \
X+		\            /
X+		 \        /
X+		  \    /
X+		   \/
X+
X+    The arrow_style field is defined for LINES, ARCS and OPEN SPLINES
X+    only as follows:
X+
X+	 0 = Hollow (actually filled with white)
X+	 1 = Filled with pen_color
X+
X+(3.0) OBJECT DEFINITION:
X+
X+    (3.1) Color Pseudo-objects (user-defined colors)
X+	  This is used to define arbitrary colors beyond the 32 standard colors.
X+	  The color objects must be defined before any other Fig objects.
X+
X+    First line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 0)
X+	int	color_number		(color number, from 32-543 (512 total))
X+     hex string	rgb values		(hexadecimal string describing red,
X+					 green and blue values (e.g. #330099) )
X+
X+    (3.2) ARC
X+
X+    First line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 5)
X+	int	sub_type		(0: pie-wedge (closed)
X+					 1: open ended arc)
X+	int	line_style		(enumeration type)
X+	int	line_thickness		(1/80 inch)
X+	int	pen_color		(enumeration type, pen color)
X+	int	fill_color		(enumeration type, fill color)
X+	int	depth			(enumeration type)
X+	int	pen_style		(pen style, not used)
X+	int	area_fill		(enumeration type, -1 = no fill)
X+	float	style_val		(1/80 inch)
X+	int	cap_style		(enumeration type)
X+	int	direction		(0: clockwise, 1: counterclockwise)
X+	int	forward_arrow		(0: no forward arrow, 1: on)
X+	int	backward_arrow		(0: no forward arrow, 1: on)
X+	float	center_x, center_y	(center of the arc)
X+	int	x1, y1			(Fig units, the 1st point the user entered)
X+	int	x2, y2			(Fig units, the 2nd point)
X+	int	x3, y3			(Fig units, the last point)
X+
X+    Forward arrow line (Optional; absent if forward_arrow is 0):
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	arrow_type		(enumeration type)
X+	int	arrow_style		(enumeration type)
X+	float	arrow_thickness		(1/80 inch)
X+	float 	arrow_width		(Fig units)
X+	float	arrow_height		(Fig units)
X+
X+    Backward arrow line (Optional; absent if backward_arrow is 0):
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	arrow_type		(enumeration type)
X+	int	arrow_style		(enumeration type)
X+	float	arrow_thickness		(1/80 inch)
X+	float	arrow_width		(Fig units)
X+	float	arrow_height		(Fig units)
X+
X+    (3.3) COMPOUND
X+
X+    A line with object code 6 signifies the start of a compound.
X+    There are four more numbers on this line which indicate the
X+    upper left corner and the lower right corner of the bounding
X+    box of this compound.  A line with object code -6 signifies
X+    the end of the compound.  Compound may be nested.
X+
X+    First line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 6)
X+	int	upperleft_corner_x	(Fig units)
X+	int	upperleft_corner_y	(Fig units)
X+	int	lowerright_corner_x	(Fig units)
X+	int	lowerright_corner_y	(Fig units)
X+
X+    Subsequent lines:
X+	objects
X+	.
X+	.
X+
X+    Last line:
X+	-6
X+
X+    (3.4) ELLIPSE
X+
X+    First line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 1)
X+	int	sub_type		(1: ellipse defined by radii
X+					 2: ellipse defined by diameters
X+					 3: circle defined by radius
X+					 4: circle defined by diameter)
X+	int	line_style		(enumeration type)
X+	int	thickness		(1/80 inch)
X+	int	pen_color		(enumeration type, pen color)
X+	int	fill_color		(enumeration type, fill color)
X+	int	depth			(enumeration type)
X+	int	pen_style		(pen style, not used)
X+	int	area_fill		(enumeration type, -1 = no fill)
X+	float	style_val		(1/80 inch)
X+	int	direction		(always 1)
X+	float	angle			(radians, the angle of the x-axis)
X+	int	center_x, center_y	(Fig units)
X+	int	radius_x, radius_y	(Fig units)
X+	int	start_x, start_y	(Fig units; the 1st point entered)
X+	int	end_x, end_y		(Fig units; the last point entered)
X+
X+    (3.5) POLYLINE
X+
X+    First line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 2)
X+	int	sub_type		(1: polyline
X+					 2: box
X+					 3: polygon
X+					 4: arc-box)
X+					 5: imported-picture bounding-box)
X+	int	line_style		(enumeration type)
X+	int	thickness		(1/80 inch)
X+	int	pen_color		(enumeration type, pen color)
X+	int	fill_color		(enumeration type, fill color)
X+	int	depth			(enumeration type)
X+	int	pen_style		(pen style, not used)
X+	int	area_fill		(enumeration type, -1 = no fill)
X+	float	style_val		(1/80 inch)
X+	int	join_style		(enumeration type)
X+	int	cap_style		(enumeration type, only used for POLYLINE)
X+	int	radius			(1/80 inch, radius of arc-boxes)
X+	int	forward_arrow		(0: off, 1: on)
X+	int	backward_arrow		(0: off, 1: on)
X+	int	npoints			(number of points in line)
X+
X+    Forward arrow line: same as ARC object
X+
X+    Backward arrow line: same as ARC object
X+
X+    Points line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	x1, y1			(Fig units)
X+	int	x2, y2			(Fig units)
X+	  .
X+	  .
X+	int	xnpoints ynpoints	(this will be the same as the 1st
X+					point for polygon and box)
X+
X+    PIC line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	boolean	flipped			orientation = normal (0) or flipped (1)
X+	char	file[]			name of picture file to import
X+
X+    (3.6) SPLINE
X+
X+    First line:
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 3)
X+	int	sub_type		(0: open approximated spline
X+					     1: closed approximated spline
X+					     2: open   interpolated spline
X+					     3: closed interpolated spline
X+					     4: open   x-spline 
X+					     5: closed x-spline)
X+	int	line_style		(See the end of this section)
X+	int	thickness		(1/80 inch)
X+	int	pen_color		(enumeration type, pen color)
X+	int	fill_color		(enumeration type, fill color)
X+	int	depth			(enumeration type)
X+	int	pen_style		(pen style, not used)
X+	int	area_fill		(enumeration type, -1 = no fill)
X+	float	style_val		(1/80 inch)
X+	int	cap_style		(enumeration type, only used for open splines)
X+	int	forward_arrow		(0: off, 1: on)
X+	int	backward_arrow		(0: off, 1: on)
X+	int	npoints			(number of control points in spline)
X+
X+    Forward arrow line: same as ARC object
X+
X+    Backward arrow line: same as ARC object
X+
X+    Points line: same as POLYLINE object
X+
X+    Control points line :
X+
X+    There is one shape factor for each point. The value of this factor
X+    must be between -1 (which means that the spline is interpolated at
X+    this point) and 1 (which means that the spline is approximated at
X+    this point). The spline is always smooth in the neighbourhood of a
X+    control point, except when the value of	the factor is 0 for which
X+    there is a first-order discontinuity (i.e. angular point).
X+
X+    (3.7) TEXT
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object 			(always 4)
X+	int	sub_type		(0: Left justified
X+					     1: Center justified
X+					     2: Right justified)
X+	int	color			(enumeration type)
X+	int	depth			(enumeration type)
X+	int	pen_style		(enumeration , not used)
X+	int	font 			(enumeration type)
X+	float	font_size 		(font size in points)
X+	float	angle			(radians, the angle of the text)
X+	int	font_flags		(bit vector)
X+	float	height			(Fig units)
X+	float	length			(Fig units)
X+	int	x, y			(Fig units, coordinate of the origin
X+					 of the string.  If sub_type = 0, it is
X+					 the lower left corner of the string.
X+					 If sub_type = 1, it is the lower
X+					 center.  Otherwise it is the lower
X+					 right corner of the string.)
X+	char	string[]		(ASCII characters; starts after a blank
X+					 character following the last number and
X+					 ends before the sequence '\001'.  This
X+					 sequence is not part of the string.
X+					 Characters above octal 177 are
X+					 represented by \xxx where xxx is the
X+					 octal value.  This permits fig files to
X+					 be edited with 7-bit editors and sent
X+					 by e-mail without data loss.
X+					 Note that the string may contain '\n'.)
X+
X+    The font_flags field is defined as follows:
X+
X+	 Bit	Description
X+
X+	  0	Rigid text (text doesn't scale when scaling compound objects)
X+	  1	Special text (for LaTeX)
X+	  2	PostScript font (otherwise LaTeX font is used)
X+	  3	Hidden text
X+
X+    The font field is defined as follows:
X+
X+	For font_flags bit 2 = 0 (LaTeX fonts):
X+
X+	 0	Default font
X+	 1	Roman
X+	 2	Bold
X+	 3	Italic
X+	 4	Sans Serif
X+	 5	Typewriter
X+
X+	For font_flags bit 2 = 1 (PostScript fonts):
X+
X+	-1	Default font
X+	 0	Times Roman
X+	 1	Times Italic
X+	 2	Times Bold
X+	 3	Times Bold Italic
X+	 4	AvantGarde Book
X+	 5	AvantGarde Book Oblique
X+	 6	AvantGarde Demi
X+	 7	AvantGarde Demi Oblique
X+	 8	Bookman Light
X+	 9	Bookman Light Italic
X+	10	Bookman Demi
X+	11	Bookman Demi Italic
X+	12	Courier
X+	13	Courier Oblique
X+	14	Courier Bold
X+	15	Courier Bold Oblique
X+	16	Helvetica
X+	17	Helvetica Oblique
X+	18	Helvetica Bold
X+	19	Helvetica Bold Oblique
X+	20	Helvetica Narrow
X+	21	Helvetica Narrow Oblique
X+	22	Helvetica Narrow Bold
X+	23	Helvetica Narrow Bold Oblique
X+	24	New Century Schoolbook Roman
X+	25	New Century Schoolbook Italic
X+	26	New Century Schoolbook Bold
X+	27	New Century Schoolbook Bold Italic
X+	28	Palatino Roman
X+	29	Palatino Italic
X+	30	Palatino Bold
X+	31	Palatino Bold Italic
X+	32	Symbol
X+	33	Zapf Chancery Medium Italic
X+	34	Zapf Dingbats
END-of-pic2fig/patch-ab
echo x - pic2fig/patch-ai
sed 's/^X//' >pic2fig/patch-ai << 'END-of-pic2fig/patch-ai'
X--- print.c.orig	Tue Jul  5 09:21:26 1988
X+++ print.c	Wed Jan 17 16:33:28 2001
X@@ -6,7 +6,7 @@
X {
X 	struct obj *p;
X 	int i, m;
X-	float x0, y0, x1, y1, ox, oy, dx, dy, ndx, ndy;
X+	float x0, y0, x1, y1, ox, oy, dx, dy, ndx, ndy, radius;
X 
X 	for (i = 0; i < nobj; i++) {
X 		p = objlist[i];
X@@ -30,18 +30,18 @@
X 			y0 = oy - y1 / 2;
X 			x1 = ox + x1 / 2;
X 			y1 = oy + y1 / 2;
X+			radius = p->o_val[2]; /* safe - BLOCK has 7 vals */
X 			if (p->o_attr & INVIS || p->o_type == BLOCK)
X 				;	/* nothing at all */
X 			else if (p->o_dotdash == 0)
X-				box(x0, y0, x1, y1);
X+				/* x0, y0, x1, x1, radius, dotted, ddtype, ddval */
X+				box(x0, y0, x1, y1, radius, 0, 0, 0  );
X 			else
X-				dotbox(x0, y0, x1, y1, p->o_dotdash, p->o_ddval
X-);
X+				box(x0, y0, x1, y1, radius, 1, p->o_dotdash == DOT, p->o_ddval);
X 			move(ox, oy);	/* for any text strings */
X 			dotext(p);	/* if there are any text strings */
X 			if (ishor(m))
X-				move(isright(m) ? x1 : x0, oy);	/* right side *
X-/
X+				move(isright(m) ? x1 : x0, oy);	/* right side */
X 			else
X 				move(ox, isdown(m) ? y0 : y1);	/* bottom */
X 			break;
X@@ -51,8 +51,7 @@
X 			x1 = ox + x1 / 2;
X 			y1 = oy + y1 / 2;
X 			if (ishor(m))
X-				move(isright(m) ? x1 : x0, oy);	/* right side *
X-/
X+				move(isright(m) ? x1 : x0, oy);	/* right side */
X 			else
X 				move(ox, isdown(m) ? y0 : y1);	/* bottom */
X 			break;
X@@ -83,18 +82,21 @@
X 		case ARC:
X 			move(ox, oy);
X 			dotext(p);
X-			if (p->o_attr & HEAD1)
X+			if (p->o_attr & HEAD1){
X 				arrow(x1 - (y1 - oy), y1 + (x1 - ox),
X 				      x1, y1, p->o_val[4], p->o_val[5]);
X-                        if (p->o_attr & INVIS)
X-                                /* probably wrong when it's cw */
X-                                move(x1, y1);
X-                        else
X-				arc(ox, oy, x1, y1, p->o_val[2], p->o_val[3],
X-					p->o_val[6]);
X-			if (p->o_attr & HEAD2)
X-				arrow(p->o_val[2] + p->o_val[3] - oy, p->o_val[3] - (p->o_val[2] - ox),
X-				      p->o_val[2], p->o_val[3], p->o_val[4], p->o_val[5]);
X+			}
X+			if (p->o_attr & INVIS){
X+				/* probably wrong when it's cw */
X+				move(x1, y1);
X+			} else {
X+				arc(ox, oy, x1, y1, p->o_val[2], p->o_val[3], p->o_val[6]);
X+			}
X+			if (p->o_attr & HEAD2){
X+				arrow(p->o_val[2] + p->o_val[3] - oy,
X+					p->o_val[3] - (p->o_val[2] - ox),
X+				    p->o_val[2], p->o_val[3], p->o_val[4], p->o_val[5]);
X+			}
X 			if (p->o_attr & CW_ARC)
X 				move(x1, y1);	/* because drawn backwards */
X 			break;
X@@ -164,21 +166,7 @@
X 	fig_flush();
X 	if (ddval == 0)
X 		ddval = prevval;
X-	prevval = ddval;
X-	/* don't save dot/dash value */
X-	dashed_line(x0, y0, x1, y1, prevval, ddtype == DOT);
X-	prevval = 0.05;
X-}
X-
X-dotbox(x0, y0, x1, y1, ddtype, ddval)	/* dotted or dashed box */
X-	float x0, y0, x1, y1;
X-	int ddtype;
X-	float ddval;
X-{
X-	dotline(x0, y0, x1, y0, ddtype, ddval);
X-	dotline(x1, y0, x1, y1, ddtype, ddval);
X-	dotline(x1, y1, x0, y1, ddtype, ddval);
X-	dotline(x0, y1, x0, y0, ddtype, ddval);
X+	dashed_line(x0, y0, x1, y1, ddval, ddtype == DOT);
X }
X 
X dotext(p)	/* print text strings of p in proper vertical spacing */
END-of-pic2fig/patch-ai
echo x - pic2fig/patch-ah
sed 's/^X//' >pic2fig/patch-ah << 'END-of-pic2fig/patch-ah'
X--- plfig.c.orig	Tue Jul  5 09:21:25 1988
X+++ plfig.c	Wed Jan 17 17:41:54 2001
X@@ -1,13 +1,12 @@
X #include <stdio.h>
X #include <ctype.h>
X #include <math.h>
X+#include "pic.h" 
X extern int dbg;
X char   *rindex ();
X 
X #define	abs(n)	(n >= 0 ? n : -(n))
X #define	max(x,y)	((x)>(y) ? (x) : (y))
X-#define	PI	3.141592654
X-#define	PI2	(PI / 2)
X 
X #define	MAXDELT	((float) 10.5)
X 
X@@ -191,8 +190,7 @@
X 		nh++;
X 	else if (t == 'B')
X 		nh--;
X-	nh = nh*2 - 1;	/* One half line to make text come out at right place *
X-/
X+	nh = nh*2 - 1;	/* One half line to make text come out at right place */
X /* quarter_lines * res in points * quarter_baseline */
X 	aty = vpos - nh * (res/72.27) * quarter_baseline;
X 	atx = hpos;
X@@ -260,16 +258,6 @@
X 	line(x1+dx, y1+dy, x1, y1);
X }
X 
X-box(x0, y0, x1, y1)
X-	float x0, y0, x1, y1;
X-{
X-	move(x0, y0);
X-	cont(x0, y1);
X-	cont(x1, y1);
X-	cont(x1, y0);
X-	cont(x0, y0);
X-}
X-
X cont(x, y)	/* continue line from here to x,y */
X 	float x, y;
X {
X@@ -325,25 +313,20 @@
X 	flyback();
X }
X 
X-/* draw CCW arc with center x,y starting at x0,y0 going to x1,y1, with rad=r *
X-/
X-/* start and stop are calculated in reverse because the positive y direction *
X-/
X-/* on the Imagen is downwards, which reverses "counterclockwise" */
X-arc(x, y, x0, y0, x1, y1, r)
X-	float x, y, x0, y0, x1, y1, r;
X+/* draw CCW arc with center x,y starting at x0,y0 going to x1,y1, with rad=r */
X+arc( float x, float y, float x0, float y0, float x1, float y1, float r)
X {
X 	float start, stop;
X 
X 	fig_flush();
X 	r = xsc(r);
X-	start = atan2((float) ysc(y1-y), (float) xsc(x1-x));
X+	start = atan2((float) ysc(y0-y), (float) xsc(x0-x));
X 	while (start < 0.0) start += 2*PI;
X 	while (start >= 2*PI) start -= 2*PI;
X-	stop = atan2((float) ysc(y0-y), (float) xsc(x0-x));
X+	stop = atan2((float) ysc(y1-y), (float) xsc(x1-x));
X 	while (stop > 2*PI) stop -= 2*PI;
X 	while (stop < start) stop += 2*PI;
X-	fig_arc((float) xconv(x), (float) yconv(y), r, r, start, stop);
X+	fig_arc((float) xconv(x), (float) yconv(y), r, r, start, stop, 0);
X 	flyback();
X }
X 
X@@ -364,7 +347,7 @@
X 	fig_window(x0, y0, x1, y1, x0/res, y1/res, x1/res, y0/res);
X }
X 
X-xconv(x)	/* convert x from external to internal form */
X+int xconv(x)	/* convert x from external to internal form */
X 	float x;
X {
X 	int v;
X@@ -373,7 +356,7 @@
X 	return v;
X }
X 
X-xsc(x)	/* convert x from external to internal form, scaling only */
X+int xsc(x)	/* convert x from external to internal form, scaling only */
X 	float x;
X {
X 	int v;
END-of-pic2fig/patch-ah
echo x - pic2fig/patch-ag
sed 's/^X//' >pic2fig/patch-ag << 'END-of-pic2fig/patch-ag'
X--- pic.h.orig	Mon Feb  8 06:21:13 1988
X+++ pic.h	Wed Jan 17 17:53:16 2001
X@@ -7,7 +7,7 @@
X #define	CW_ARC	8	/* clockwise arc */
X #define	SHADEDOBJ	16	/* Object should be drawn shaded */
X #define	WHITEOBJ	32	/* Object should be whitened inside */
X-#define	PI	3.141592654
X+#define PI			3.14159265358979323846
X #define	PI2	PI/2
X #define	SCALE	1.0	/* default scale: units/inch */
X #define	WID	0.75	/* default width for boxes and ellipses */
X@@ -128,4 +128,7 @@
X extern	struct pushstack stack[];
X extern	int	nstack;
X 
X-extern float atof();
X+extern box(float x0, float y0, float x1, float y1, float radius, int dotted, int ddtype, float ddbval );
X+extern fig_arc(float xcenter, float ycenter, float xradius, float yradius, float start, float stop, int ellipse);
X+extern arc( float x, float y, float x0, float y0, float x1, float y1, float r);
X+extern map(float x,float  y,int *ix, int *iy, int bounds);
END-of-pic2fig/patch-ag
echo x - pic2fig/patch-af
sed 's/^X//' >pic2fig/patch-af << 'END-of-pic2fig/patch-af'
X--- main.c.orig	Mon Feb  8 06:21:12 1988
X+++ main.c	Wed Jan 17 07:35:42 2001
X@@ -1,10 +1,10 @@
X #include	<stdio.h>
X #include	<ctype.h>
X+#include	<strings.h>
X #include	"pic.h"
X #include	"picy.h"
X 
X static reset();
X-extern char *sprintf(), *strcpy();
X 
X struct	obj	*objlist[MAXOBJ];	/* store the elements here */
X int	nobj	= 0;
END-of-pic2fig/patch-af
echo x - pic2fig/patch-ae
sed 's/^X//' >pic2fig/patch-ae << 'END-of-pic2fig/patch-ae'
X--- figd.c.orig	Sat Aug  6 19:52:43 1988
X+++ figd.c	Wed Jan 17 19:02:51 2001
X@@ -6,13 +6,18 @@
X  *
X  * Modified by Micah Beck to produce Fig code
X  * Modified by Micah Beck again to produce Fig 1.4 code
X+ * Modified by Patrick Powell to produce Fig 3.2 code
X  */
X 
X #include <stdio.h>
X #include <ctype.h>
X #include "object.h"
X+#include "pic.h"
X 
X-#define DEF_PEN_SIZE	8	/* Default pen diameter */
X+/* #define DEF_PEN_SIZE	8	/ * Default pen diameter */
X+#define DEF_PEN_SIZE	1	/* Default pen diameter */
X+#define DEF_FONT_SIZE	12	/* Default pen diameter */
X+#define DEF_FONT_ID  	16	/* helvetica */
X #define	MAXPOINTS	300	/* Max number of points in a path */
X 
X #define bool int
X@@ -23,6 +28,8 @@
X #define	P_BLACK		15
X #define	TEXTURE		3
X #define ORTEXTURE	7
X+#define FONT_HT 12
X+#define FONT_WIDTH 8
X 
X extern	double	sqrt(), cos(), sin();
X 
X@@ -31,20 +38,26 @@
X #define RES			1000.0
X #define Pix_To_In(x)		(((float) x) / RES)
X 
X-#define FIGRES			80
X+/* #define FIGRES			80 */
X+#define FIGRES			1200
X #define FIGCANV_W		(8*FIGRES)
X #define FIGCANV_H		(10*FIGRES)
X+#define Points_To_Figpix(x)	((int)(FIGRES * (x)/72.0))
X #define Pix_To_Figpix(x)	((int)(FIGRES * Pix_To_In(x)))
X-#define Pen_to_Figpix(x)	((x*FIGRES + 500) / 1000)
X+/* #define Pen_to_Figpix(x)	((x*FIGRES + 500) / 1000) */
X+/* pen thickness in 1/80 of inch */
X+#define Pen_to_Figpix(x)	((Pix_To_In(x) + 79) / 80)
X 
X 
X extern	int dbg;		/* Non-zero when debugging info wanted */
X static	int xx[MAXPOINTS],yy[MAXPOINTS];	/* Current path */
X-static	int xmin, xmax, ymin, ymax; /* Extremes of the graph, Imagen coords */
X+static	int ixmin, ixmax, iymin, iymax; /* Extremes of the graph, Imagen coords */
X static	float xslope,yslope,xbase,ybase;/* Convert Window to Viewport */
X static	int arraylen;		/* Number of points in current path */
X static	bool pathsent;		/* True if path has been defined */
X-static	int ipensize;		/* Desired current pen size */
X+static	int ipensize = DEF_PEN_SIZE;		/* Desired current pen size */
X+static	int ifontsize = DEF_FONT_SIZE;		/* Desired current font size */
X+static	int ifontid = DEF_FONT_ID;		/* Desired current font size */
X extern	FILE *TEXFILE;		/* Output file */
X 
X 
X@@ -62,7 +75,7 @@
X 	yslope = RES * (hiypage-loypage) / (hiy-loy);
X 	ybase  = RES * loypage - loy*yslope;
X 	if (dbg)
X-	    printf("Coefficients: %10.5f%10.5f%10.5f%10.5f\n",
X+	    printf("Coefficients: %10.5f  %10.5f  %10.5f  %10.5f\n",
X 		xslope,xbase,yslope,ybase);
X }
X 
X@@ -70,14 +83,18 @@
X /*
X  * Set the size of the virtual pen used in drawing
X  */
X+static sendpath();
X pensize(x)
X int	x;
X {
X 	if (x != ipensize) {
X 	    ipensize = Pen_to_Figpix(x);
X+        ifontsize = x;
X+		if( ipensize == 0 ) ipensize = 1;
X 	    if (!pathsent) sendpath();
X 	    clearpath();
X 	}
X+	if( dbg) printf("pensize %d -> %d\n", x, ipensize );
X }
X 
X 
X@@ -89,8 +106,7 @@
X {
X     int     i;
X 
X-    if (!pathsent)
X-	sendpath ();
X+    if (!pathsent) sendpath ();
X     clearpath ();
X 
X     fprintf (stderr, "pic2fig: textures not implemented (tx %d)", pcount);
X@@ -118,22 +134,19 @@
X static ckbounds(x, y)
X int x,y;
X {
X-	if (x < xmin) xmin = x;
X-	if (x > xmax) xmax = x;
X-	if (y < ymin) ymin = y;
X-	if (y > ymax) ymax = y;
X+	if (x < ixmin) ixmin = x;
X+	if (x > ixmax) ixmax = x;
X+	if (y < iymin) iymin = y;
X+	if (y > iymax) iymax = y;
X }
X 
X 
X /*
X  * Routine to convert from window coords to Imagen coords.  Also,
X- * keeps xmin, etc, up to date.  Note that ix and iy are passed by
X+ * keeps ixmin, etc, up to date.  Note that ix and iy are passed by
X  * reference, and they are returned in units of INCHES.
X  */
X-map(x, y, ix, iy, bounds)
X-float		x, y;
X-register int	*ix, *iy;
X-bool	bounds;
X+map(float x,float  y,int *ix, int *iy, int bounds)
X {
X 	*ix = xbase + xslope * x;
X 	*iy = ybase + yslope * y;
X@@ -149,24 +162,84 @@
X float	x, y;
X int	position;	/* Indicates what part of text is at (x,y) */
X {
X-    int	    ix, iy, offset;
X-    char    *cp;
X+    int	    ix, iy, offset, c;
X+    unsigned char    *cp;
X     map(x, y, &ix, &iy, 1);
X 
X-    for (cp = text; *cp && isspace(*text); cp++);
X+    for (cp = (unsigned char *)text; isspace(*cp); cp++);
X     if (!*cp) return;
X 
X #ifdef TEXT_LEFT_ONLY
X-    if (position != T_LEFT_JUSTIFIED) offset = strlen(cp)*8;
X+    if (position != T_LEFT_JUSTIFIED) offset = strlen(cp)*Points_To_Figpix(ifontsize);
X     if (position == T_CENTER_JUSTIFIED) offset = offset/2;
X     position = T_LEFT_JUSTIFIED;
X #else
X     offset = 0;
X #endif TEXT_LEFT_ONLY
X 
X+/* FORMAT 1.4 CODE
X     fprintf(TEXFILE, "%d %d %d %d %d %d %6.3f %d %d %d %d %d %s%c\n",
X-	O_TEXT, position, -1, -1, -1, -1, 0.0, -1, 16, strlen(cp)*8,
X+                   4   justification (0,1,2)
X+                            font (unused)
X+                               fontsize (unused)
X+                                  pen (unused)
X+                                     color
X+                                        depth
X+                                          angle (not used)
X+                                              height (pixels)
X+                                                 length (pixels)
X+                                                
X+	4, position, -1, -1, -1, -1, 0.0, -1, 16, strlen(cp)*Points_To_Figpix(ifontsize),
X 	Pix_To_Figpix(ix) - offset, Pix_To_Figpix(iy), cp, '\01');
X+Example:
X+4 1 -1 -1 -1 -1  0.000 -1 16 24 229 603 FEP^A
X+
X+FORMAT 3.2 CODE
X+    (3.7) TEXT
X+    type    name            (brief description)
X+    ----    ----            -------------------
X+    int object          (always 4)
X+    int sub_type        (0: Left justified
X+                         1: Center justified
X+                         2: Right justified)
X+    int color           (enumeration type)
X+    int depth           (enumeration type)
X+    int pen_style       (enumeration , not used)
X+    int font            (enumeration type)
X+    float   font_size       (font size in points)
X+    float   angle           (radians, the angle of the text)
X+    int font_flags      (bit vector)
X+    float   height          (Fig units)
X+    float   length          (Fig units)
X+    int x, y            (Fig units, coordinate of the origin
X+                     of the string.  If sub_type = 0, it is
X+                     the lower left corner of the string.
X+                     If sub_type = 1, it is the lower
X+                     center.  Otherwise it is the lower
X+                     right corner of the string.)
X+    char    string[]        (ASCII characters; starts after a blank
X+                     character following the last number and
X+                     ends before the sequence '\001'.  This
X+                     sequence is not part of the string.
X+
X+
X+Example:
X+4 1 -1 0 -1 -1 12 0.0000 4 135 330 3450 9060 FEP\001 
X+*/
X+    if(dbg) printf("string (%d,%d) '%s'\n", Pix_To_Figpix(ix-offset), Pix_To_Figpix(iy), cp );
X+		
X+    fprintf(TEXFILE, "%d %d %d %d %d %d %d %6.3f %d %d %d %d %d ",
X+	O_TEXT, position,       -1, 0,-1,ifontid,ifontsize,0.0,   4,Pix_To_Figpix(FONT_HT),Pix_To_Figpix(strlen(cp)*FONT_WIDTH),
X+		Pix_To_Figpix(ix-offset), Pix_To_Figpix(iy));
X+	while( (c = ((unsigned char *)(cp))[0]) ){
X+		if( c == '\\' ){
X+			fprintf(TEXFILE, "\\\\");
X+		} else if( isprint(c) || isspace(c) ){
X+			fprintf(TEXFILE, "%c", c);
X+		}
X+		++cp;
X+	}
X+	fprintf(TEXFILE, "\\001\n");
X }
X 
X 
X@@ -191,11 +264,11 @@
X int	x,y;
X {
X     if (arraylen == 0 || x != xx[arraylen] || y != yy[arraylen]) {
X-	arraylen++;
X-	xx[arraylen] = x;
X-	yy[arraylen] = y;
X-	ckbounds(x, y);
X-	pathsent = FALSE;
X+		arraylen++;
X+		xx[arraylen] = x;
X+		yy[arraylen] = y;
X+		ckbounds(x, y);
X+		pathsent = FALSE;
X     }
X }
X 
X@@ -208,16 +281,55 @@
X {
X 	register int i;
X 
X-	if (dbg) printf("Sending path ...%d\n", arraylen);
X+	if (dbg) printf("Sendpath [%d], ipensize %d\n", arraylen, ipensize);
X 	if (arraylen > 1) {
X 
X+	/*
X 	    fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X 		O_POLYLINE, T_POLYLINE, SOLID_LINE,
X 		ipensize, -1, -1, -1, -1, -1, 0, 0);
X-	    for (i=1; i<=arraylen; i++)
X-		fprintf(TEXFILE, "%d %d ",
X+
X+Example:
X+        2 1 0 1 -1 -1 -1 -1 -1 0 0
X+        19 149  19 9  179 9  179 149  19 149  9999 9999
X+
X+New format:
X+       2 1 0 1 -1 -1 0 -1 -1 -1.000 0 0 -1 0 0 5
X+       code     pen_color
X+         type      fill_color
X+           line style 
X+                     depth
X+                       pen_style
X+                             style_value
X+                                   join_style
X+                                      cap_style
X+                                          radius
X+                                             forward_arrow
X+                                                count
X+             thickness (1/80 inch)
X+           -1 = Default
X+            0 = Solid
X+            1 = Dashed
X+            2 = Dotted
X+            3 = Dash-dotted
X+            4 = Dash-double-dotted
X+            5 = Dash-triple-dotted
X+
X+       300 2250 300 150 2700 150 2700 2250 300 2250
X+
X+
X+	*/
X+	    fprintf(TEXFILE, "%d %d %d %d", 2, T_POLYLINE, SOLID_LINE, ipensize );
X+		fprintf(TEXFILE, " 0 7 50 0 -1 3.000 0 0 -1 0 0 ");
X+	    fprintf(TEXFILE, " %d\n  ", arraylen );
X+	    for (i=1; i<=arraylen; i++){
X+			if (dbg) printf(" (%d,%d)", Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X+			fprintf(TEXFILE, "%d %d ",
X 			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X-	    fprintf(TEXFILE, "9999 9999\n");
X+		}
X+		if (dbg) printf("\n");
X+	    /* fprintf(TEXFILE, "9999 9999\n"); */
X+	    fprintf(TEXFILE, "\n");
X 	}
X 
X 	pathsent = TRUE;
X@@ -234,17 +346,25 @@
X {
X 	register int i;
X 
X-	if (dbg) printf("Sending path ...%d\n", arraylen);
X+	if (dbg) printf("Send_dashed_path ...%d\n", arraylen);
X 	if (arraylen < 2) return;
X 	else {
X+/*
X 	    fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X 		O_POLYLINE, T_POLYLINE,
X 		(dotted ? DOTTED_LINE : DASH_LINE), ipensize,
X 		-1, -1, -1, -1, -1, 0, 0);
X-	    for (i=1; i<=arraylen; i++)
X+ */
X+	    fprintf(TEXFILE, "%d %d %d %d", 2, T_POLYLINE,
X+			(dotted? DOTTED_LINE: DASH_LINE), ipensize );
X+		fprintf(TEXFILE, " 0 7 50 0 -1 3.000 0 0 -1 0 0 ");
X+	    fprintf(TEXFILE, " %d\n  ", arraylen );
X+	    for (i=1; i<=arraylen; i++){
X 		fprintf(TEXFILE, "%d %d ",
X 			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X-	    fprintf(TEXFILE, "9999 9999\n");
X+		}
X+	    /* fprintf(TEXFILE, "9999 9999\n"); */
X+	    fprintf(TEXFILE, "\n");
X 	}
X 
X 	pathsent = TRUE;
X@@ -290,32 +410,141 @@
X 
X /*
X  * Draw the indicated arc.  Angles in radians
X+ *  we assume that default direction is counter clockwise
X  */
X-fig_arc(xcenter, ycenter, xradius, yradius, start, stop)
X-float	xcenter, ycenter, xradius, yradius, start, stop;
X+fig_arc(float xcenter, float ycenter, float xradius, float yradius, float start, float stop, int ellipse )
X {
X-    int X0, Y0, xrad, yrad, xend, yend;
X+    int X0, Y0, xrad, yrad, xend, yend, xstart, ystart;
X     extern double cos(), sin();
X+	if(dbg) printf("fig_arc: (%g,%g) xrad %g, yrad %g, start %g, stop %g\n",
X+		xcenter, ycenter, xradius, yradius, start, stop );
X 
X+	if(dbg) printf("fig_arc: xslope %g, yslope %g\n", 0.0+xslope, 0.0+yslope);
X     map(xcenter, ycenter, &X0, &Y0, FALSE);
X     xrad = xradius * xslope;
X     yrad = yradius * yslope;
X+	if(dbg) printf("fig_arc: xrad %g, yrad %g\n", 0.0+xrad, 0.0+yrad);
X     if (is_onarc(0.0, start, stop)) ckbounds(X0+xrad, Y0);
X     if (is_onarc(PI/2, start, stop)) ckbounds(X0, Y0+yrad);
X     if (is_onarc(PI, start, stop)) ckbounds(X0-xrad, Y0);
X     if (is_onarc(1.5*PI, start, stop)) ckbounds(X0, Y0-yrad);
X-    xend = X0 + xrad * cos(start) + 0.5;
X-    yend = Y0 + yrad * sin(start) + 0.5;
X-    ckbounds(xend, yend);
X+    xstart = X0 + xrad * cos(start) + 0.5;
X+    ystart = Y0 + yrad * sin(start) + 0.5;
X+	if(dbg) printf("fig_arc: xstart %g, ystart %g\n", 0.0+xstart, 0.0+ystart);
X+    ckbounds(xstart, ystart);
X     xend = X0 + xrad * cos(stop);
X     yend = Y0 + yrad * sin(stop);
X     ckbounds(xend, yend);
X+	if(dbg) printf("Ellipse: X0 %d, Y0 %d, xrad %d, yrad %d, xstart %d, ystart %d, xend %d, yend %d\n",
X+		Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X+		Pix_To_Figpix(xrad), Pix_To_Figpix(yrad),
X+		Pix_To_Figpix(xstart), Pix_To_Figpix(ystart),
X+		Pix_To_Figpix(xend), Pix_To_Figpix(yend));
X+
X+/*
X+    int object_code     (always 1)
X+    int sub_type        (1 : ellipse defined by radiuses
X+                     2 : ellipse defined by diameters
X+                     3 : circle defined by radius
X+                     4 : circle defined by diameter)
X+    int line_style      (See the end of this section)
X+    int thickness       (pixels, not used)
X+    int color           (not used)
X+    int depth           (not used)
X+    int pen         (not used)
X+    int area_fill       (not used)
X+    float   style_val       (pixels, not used)
X+    int direction       (always 1)
X+    float   angle           (radian, the angle of the x-axis)
X+    int center_x, center_y  (pixels)
X+    int radius_x, radius_y  (pixels)
X+    int start_x, start_y    (pixels; the 1st point entered)
X+    int end_x, end_y        (pixels; the last point entered)
X+
X+Example:
X+  1 1 0 1 -1, -1 -1 -1 -1 1 0  0.000  0.000  0.000  0.000  0.000  0.000
X 
X     fprintf(TEXFILE, "%d %d %d %d %d, %d %d %d %d %d %d %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f\n",
X 		O_ELLIPSE, T_ELLIPSE_BY_RAD,
X 	        SOLID_LINE, ipensize, -1, -1, -1, -1, -1, 1, 0.0,
X 		Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X 		Pix_To_Figpix(xrad), Pix_To_Figpix(yrad), 0.0, 0.0, 0.0, 0.0);
X+
X+
X+    int object_code     (always 1)
X+    int sub_type        (1: ellipse defined by radii
X+                     2: ellipse defined by diameters
X+                     3: circle defined by radius
X+                     4: circle defined by diameter)
X+    int line_style      (enumeration type)
X+    int thickness       (1/80 inch)
X+   --
X+    int pen_color       (enumeration type, pen color)
X+    int fill_color      (enumeration type, fill color)
X+    int depth           (enumeration type)
X+    int pen_style       (pen style, not used)
X+    int area_fill       (enumeration type, -1 = no fill)
X+    float   style_val       (1/80 inch)
X+    int direction       (always 1)
X+    float   angle           (radians, the angle of the x-axis)
X+    int center_x, center_y  (Fig units)
X+    int radius_x, radius_y  (Fig units)
X+    int start_x, start_y    (Fig units; the 1st point entered)
X+    int end_x, end_y        (Fig units; the last point entered)
X+
X+Example:
X+   1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 1125 975 675 375 1125 975 1800 1350
X+           pen      areafill
X+             fill      styleval
X+               depth
X+                  pen_style
X+*/
X+
X+
X+	if( ellipse ){
X+		fprintf(TEXFILE, "%d %d %d %d", O_ELLIPSE, T_ELLIPSE_BY_RAD, SOLID_LINE, ipensize );
X+		fprintf(TEXFILE, " 0 7 50 0 -1 0.0 1 0.0" );
X+		fprintf(TEXFILE, " %d %d %d %d %d %d %d %d\n",
X+			Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X+			Pix_To_Figpix(xrad), Pix_To_Figpix(yrad),
X+			Pix_To_Figpix(xstart), Pix_To_Figpix(ystart),
X+			Pix_To_Figpix(xend), Pix_To_Figpix(yend));
X+	} else {
X+/*
X+    (3.2) ARC
X+
X+    First line:
X+    type    name            (brief description)
X+    ----    ----            -------------------
X+    int object_code     (always 5)
X+    int sub_type        (0: pie-wedge (closed)
X+                     1: open ended arc)
X+    int line_style      (enumeration type)
X+    int line_thickness      (1/80 inch)
X+    int pen_color       (enumeration type, pen color)
X+    int fill_color      (enumeration type, fill color)
X+    int depth           (enumeration type)
X+    int pen_style       (pen style, not used)
X+    int area_fill       (enumeration type, -1 = no fill)
X+    float   style_val       (1/80 inch)
X+    int cap_style       (enumeration type)
X+    int direction       (0: clockwise, 1: counterclockwise)
X+    int forward_arrow       (0: no forward arrow, 1: on)
X+    int backward_arrow      (0: no forward arrow, 1: on)
X+    float   center_x, center_y  (center of the arc)
X+    int x1, y1          (Fig units, the 1st point the user entered)
X+    int x2, y2          (Fig units, the 2nd point)
X+    int x3, y3          (Fig units, the last point)
X+
X+*/
X+		fprintf(TEXFILE, "%d %d %d %d", O_ARC, 1, SOLID_LINE, ipensize );
X+		fprintf(TEXFILE, " 0 7 50 0 -1 0.0 0 1 0 0" );
X+		fprintf(TEXFILE, " %d %d %d %d %d %d %d %d\n",
X+			Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X+			Pix_To_Figpix(xstart), Pix_To_Figpix(ystart),
X+			Pix_To_Figpix(xend), Pix_To_Figpix(yend),
X+			Pix_To_Figpix(xend), Pix_To_Figpix(yend));
X+	}
X }
X 
X 
X@@ -326,7 +555,7 @@
X float	xcenter, ycenter, radius;
X {
X 	if (dbg) printf("Circle: %6.3f, %6.3f, %6.3f\n", xcenter, ycenter, radius);
X-	fig_arc(xcenter, ycenter, radius, radius, 0.0, TWOPI);
X+	fig_arc(xcenter, ycenter, radius, radius, 0.0, TWOPI, 1);
X }
X 
X 
X@@ -338,7 +567,7 @@
X {
X 	if (dbg) printf("Ellipse: %6.3f, %6.3f, %6.3f, %6.3f\n", xcenter, ycenter,
X 		xradius, yradius);
X-	fig_arc(xcenter, ycenter, xradius, yradius, 0.0, TWOPI);
X+	fig_arc(xcenter, ycenter, xradius, yradius, 0.0, TWOPI, 1);
X }
X 
X 
X@@ -347,14 +576,56 @@
X  */
X fig_begin_drawing()
X {
X-  	fprintf(TEXFILE, "#FIG 1.4\n%d %d\n", FIGRES, 2);
X+
X+/*
X+(1) The very first line is a comment line containing the name and version:
X+    #FIG 3.2
X+(2) The first non-comment line consists of the following:
X+
X+    string  orientation     ("Landscape" or "Portrait")
X+    string  justification       ("Center" or "Flush Left")
X+    string  units           ("Metric" or "Inches")
X+    string  papersize       ("Letter", "Legal", "Ledger", "Tabloid",
X+                     "A", "B", "C", "D", "E",
X+                     "A4",   "A3", "A2", "A1", "A0" and "B5")
X+    float   magnification       (export and print magnification, %)
X+    string  multiple-page       ("Single" or "Multiple" pages)
X+    int transparent color   (color number for transparent color for GIF
X+                     export. -3=background, -2=None, -1=Default,
X+                     0-31 for standard colors or 32- for user colors)
X+    # optional comment      (An optional set of comments may be here,
X+                     which are associated with the whole figure)
X+    int resolution coord_system (Fig units/inch and coordinate system:
X+                       1: origin at lower left corner (NOT USED)
X+                       2: upper left)
X+Example:
X+   #FIG 3.2
X+   Landscape
X+   Center
X+   Inches
X+   Letter
X+   100.00
X+   Single
X+   -2
X+   1200 2
X+
X+*/
X+  	fprintf(TEXFILE, "#FIG 3.2\n");
X+  	fprintf(TEXFILE, "Landscape\n");
X+  	fprintf(TEXFILE, "Center\n");
X+  	fprintf(TEXFILE, "Inches\n");
X+  	fprintf(TEXFILE, "Letter\n");
X+  	fprintf(TEXFILE, "100.00\n");
X+  	fprintf(TEXFILE, "Single\n");
X+  	fprintf(TEXFILE, "-2\n");
X+  	fprintf(TEXFILE, "%d %d\n", FIGRES, 2 );
X 
X 	fig_window(0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 3.0, 3.0);
X-	xmin = 30000;	xmax = -30000;
X-	ymin = 30000;	ymax = -30000;
X+	ixmin = 30000;	ixmax = -30000;
X+	iymin = 30000;	iymax = -30000;
X 	arraylen = 0;
X 	pathsent = FALSE;
X-	ipensize = Pen_to_Figpix(DEF_PEN_SIZE);
X+	pensize(DEF_PEN_SIZE);
X }
X 
X 
X@@ -370,11 +641,11 @@
X 	map(0.0, 0.0, &ixzero, &iyzero, 0);
X 	if (dbg) {
X 	    printf("Origin is %8.4fin from left edge of graph,",
X-		Pix_To_In(ixzero-xmin));
X+		Pix_To_In(ixzero-ixmin));
X 	    printf("%8.4fin from top edge of graph,\n",
X-	    	Pix_To_In(ymax-iyzero));
X-	    printf("and graph is %6.3fin wide", Pix_To_In(xmax - xmin));
X-	    printf(" and %6.3fin high.\n", Pix_To_In(ymax - ymin));
X+	    	Pix_To_In(iymax-iyzero));
X+	    printf("and graph is %6.3fin wide", Pix_To_In(ixmax - ixmin));
X+	    printf(" and %6.3fin high.\n", Pix_To_In(iymax - iymin));
X 	}
X }
X 
X@@ -392,15 +663,117 @@
X 	clearpath();
X     }
X 
X+/*
X     fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X 	O_SPLINE, T_OPEN_NORMAL,
X 	SOLID_LINE, ipensize, -1, -1, -1, -1, -1, 0, 0);
X+    fprintf(TEXFILE, "9999 9999\n");
X+
X+New format:
X+    int object_code     (always 3)
X+    int sub_type        (0: open approximated spline
X+                         1: closed approximated spline
X+                         2: open   interpolated spline
X+                         3: closed interpolated spline
X+                         4: open   x-spline
X+                         5: closed x-spline)
X+    int line_style      (See the end of this section)
X+    int thickness       (1/80 inch)
X+    int pen_color       (enumeration type, pen color)
X+    int fill_color      (enumeration type, fill color)
X+    int depth           (enumeration type)
X+    int pen_style       (pen style, not used)
X+    int area_fill       (enumeration type, -1 = no fill)
X+    float   style_val       (1/80 inch)
X+    int cap_style       (enumeration type, only used for open splines)
X+    int forward_arrow       (0: off, 1: on)
X+    int backward_arrow      (0: off, 1: on)
X+    int npoints         (number of control points in spline)
X+
X+    Forward arrow line: same as ARC object
X+
X+    Backward arrow line: same as ARC object
X+
X+    Points line: same as POLYLINE object
X+
X+    Control points line :
X+
X+    There is one shape factor for each point. The value of this factor
X+    must be between -1 (which means that the spline is interpolated at
X+    this point) and 1 (which means that the spline is approximated at
X+    this point). The spline is always smooth in the neighbourhood of a
X+    control point, except when the value of the factor is 0 for which
X+    there is a first-order discontinuity (i.e. angular point).
X+
X+Example:
X+    3 2 0 1 0 7 50 0 -1 0.000 0 0 0 3
X+     975 1950 1875 1500 2550 1950
X+     0.000 -1.000 0.000
X+
X+*/
X+    fprintf(TEXFILE, "%d %d %d %d", 3, 2, SOLID_LINE, ipensize );
X+	fprintf(TEXFILE, " 0 7 50 0 -1 0.000 0 0 0 %d\n  ", N-1 );
X     for (i=1; i<N; i++) {
X-	ckbounds(xx[i], yy[i]);
X-	fprintf(TEXFILE, "%d %d ",
X-		Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X-      }
X-    fprintf(TEXFILE, "9999 9999\n");	
X+		ckbounds(xx[i], yy[i]);
X+		fprintf(TEXFILE, " %d %d",
X+			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X+	}
X+    fprintf(TEXFILE, "\n  ");
X+    fprintf(TEXFILE, " 0.0");
X+    for (i=2; i<N-1; i++) {
X+		fprintf(TEXFILE, " -1.0");
X+	}
X+    fprintf(TEXFILE, " 0.0\n");
X+}
X+
X+
X+box(float x0, float y0, float x1, float y1, float radius, int dotted,
X+   int ddtype, float ddval )
X+{
X+	float t;
X+	int ix0, ix1, iy0, iy1, irad;
X+    if (!pathsent) sendpath ();
X+    clearpath ();
X+	if(dbg)printf("box (%g,%g) (%g,%g), rad %g, dotted %d, type %d, dval %g\n",
X+		x0,y0,x1,y1,radius,dotted,ddtype,ddval);
X+
X+	/* sort the dimensions so that x0 < x1, y0 < y1 */
X+	if( x0 > x1 ){ t = x1; x1 = x0; x0 = t; }
X+	if( y0 > y1 ){ t = y1; y1 = y0; y0 = t; }
X+	if( radius < 0 ) radius = 0;
X+	t = (x1 - x0)/2; if (radius > t ) radius = t;
X+	t = (y1 - y0)/2; if (radius > t ) radius = t;
X+	if(dbg)printf("box final (%g,%g) (%g,%g), rad %g, dotted %d, type %d, dval %g\n",
X+		x0,y0,x1,y1,radius,dotted,ddtype,ddval);
X+	ix0 = xconv(x0); iy0 = yconv(y0);
X+	ix1 = xconv(x1); iy1 = yconv(y1);
X+	irad = (int)(radius*80);
X+	if(dbg)printf("box  (%d,%d), (%d,%d), rad %d\n",ix0, iy0, ix1, iy1, irad);
X+	if( radius > 0 ){
X+		fprintf(TEXFILE, "%d %d ", 2, 4 );
X+	} else {
X+		fprintf(TEXFILE, "%d %d ", 2, 2 );
X+	}
X+	if( dotted ){
X+		if( ddtype == 1 ){
X+			fprintf(TEXFILE, "%d %d", 2, ipensize );
X+			fprintf(TEXFILE, " 0 7 50 0 -1 3.000 0 0" );
X+		} else {
X+			fprintf(TEXFILE, "%d %d", 1, ipensize );
X+			fprintf(TEXFILE, " 0 7 50 0 -1 3.000 0 0" );
X+		}
X+	} else {
X+		fprintf(TEXFILE, "%d %d", 0, ipensize );
X+		fprintf(TEXFILE, " 0 7 50 0 -1 0.000 0 0" );
X+	}
X+	fprintf(TEXFILE, " %d", irad );
X+	fprintf(TEXFILE, " 0 0 %d\n  ", 5);
X+	fprintf(TEXFILE, " %d %d", Pix_To_Figpix(ix0), Pix_To_Figpix(iy0));
X+	fprintf(TEXFILE, " %d %d", Pix_To_Figpix(ix0), Pix_To_Figpix(iy1));
X+	fprintf(TEXFILE, " %d %d", Pix_To_Figpix(ix1), Pix_To_Figpix(iy1));
X+	fprintf(TEXFILE, " %d %d", Pix_To_Figpix(ix1), Pix_To_Figpix(iy0));
X+	fprintf(TEXFILE, " %d %d", Pix_To_Figpix(ix0), Pix_To_Figpix(iy0));
X+	fprintf(TEXFILE, "\n");
X }
X 
X 
END-of-pic2fig/patch-ae
echo x - pic2fig/patch-ad
sed 's/^X//' >pic2fig/patch-ad << 'END-of-pic2fig/patch-ad'
X--- boxgen.c.orig	Mon Feb  8 06:21:11 1988
X+++ boxgen.c	Wed Jan 17 07:35:42 2001
X@@ -10,7 +10,7 @@
X 	float ddval, xwith, ywith;
X 	int with;
X 	float h, w;
X-	float x0, y0, x1, y1;
X+	float x0, y0, x1, y1, radius;
X 	struct obj *p, *ppos;
X 
X 	h = getfval("boxht");
X@@ -18,6 +18,7 @@
X 	invis = at = 0;
X 	with = xwith = ywith = 0;
X 	ddtype = ddval = 0;
X+	radius = 0;
X 	for (i = 0; i < nattr; i++) {
X 		switch (attr[i].a_type) {
X 		case WHITE:
X@@ -58,6 +59,9 @@
X 		case LJUST: case RJUST: case CENTER: case SPREAD: case FILL: case ABOVE: case BELOW:
X 			savetext(attr[i].a_type, attr[i].a_val.p);
X 			break;
X+		case RADIUS:
X+			radius = attr[i].a_val.f;
X+			break;
X 		}
X 	}
X 	if (with) {
X@@ -90,13 +94,14 @@
X 	y1 = cury + h / 2;
X 	extreme(x0, y0);
X 	extreme(x1, y1);
X-	p = makenode(BOX, 2);
X+	p = makenode(BOX, 3);
X 	p->o_val[0] = w;
X 	p->o_val[1] = h;
X+	p->o_val[2] = radius;
X 	p->o_dotdash = ddtype;
X 	p->o_ddval = ddval;
X 	p->o_attr = invis;
X-	dprintf("B %g %g %g %g at %g %g, h=%g, w=%g\n", x0, y0, x1, y1, curx, cury, h, w);
X+	dprintf("B %g %g %g %g at %g %g, h=%g, w=%g radius=%g\n", x0, y0, x1, y1, curx, cury, h, w, radius);
X 	if (isright(hvmode))
X 		curx = x1;
X 	else if (isleft(hvmode))
END-of-pic2fig/patch-ad
echo x - pic2fig/patch-ac
sed 's/^X//' >pic2fig/patch-ac << 'END-of-pic2fig/patch-ac'
X--- Makefile.orig	Mon Apr 29 10:11:02 1991
X+++ Makefile	Wed Jan 17 18:32:39 2001
X@@ -1,7 +1,7 @@
X BINDIR	=	/usr/local/bin
X-CFLAGS	=	-O4 -s $(CROSS)
X+#CFLAGS	=	-O4 -s $(CROSS)
X #LDFLAGS=	-zs
X-LDFLAGS=	-z $(CROSS)
X+#LDFLAGS=	-z $(CROSS)
X YFLAGS	=	-d
X 
X MOFILES = main.o boxgen.o print.o misc.o symtab.o blockgen.o circgen.o  \
X@@ -29,7 +29,7 @@
X 	-@echo ""
X 
X pic2fig: picy.o picl.o $(OFILES)
X-	cc $(LDFLAGS) -o $@ picy.o picl.o $(OFILES) -lm
X+	$(CC) $(LDFLAGS) -o $@ picy.o picl.o $(OFILES) -lm
X 
X # The following .o files depend of picy.c, since they really need picy.h
X picl.o:		picl.c pic.h picy.c
END-of-pic2fig/patch-ac
echo x - pic2fig/patch-aa
sed 's/^X//' >pic2fig/patch-aa << 'END-of-pic2fig/patch-aa'
X--- FORMAT1.4.orig	Wed Jan 17 16:46:20 2001
X+++ FORMAT1.4	Wed Jan 17 16:45:56 2001
X@@ -0,0 +1,285 @@
X+NOTE: THIS FILE FORMAT IS OBSOLETE.  THIS DOCUMENT IS ONLY PROVIDED
X+	FOR BACKWARD COMPATIBILITY AND INFORMATION.
X+
X+The following is the format of fig output (fig 1.4).
X+
X+(1) The very first line is a comment line containing the name and version:
X+	#FIG 1.4
X+
X+    The character # at the first column of a line indicates that the line
X+    is a comment line which will be ignored.
X+
X+(2) The first non-comment line consists of two numbers :
X+
X+	int	fig_resolution		(pixels/inch)
X+	int	coordinate_system	(1 : origin is at the lower left corner
X+					 2 : Upper left)
X+
X+    Fig_resolution is the resolution fig is using for the current file.
X+    It may not be the same as screen resolution (which can be higher or
X+    lower).  I assume that a pixel is square, therefore this number
X+    represents drawing resolution in both direction.  I've experimented
X+    with fig automatically changing this number according to the resolution
X+    of the monitor it is running on (The screen resolution, width and height
X+    in pixels, not pixel/inch, can be done by doing a ioctl on the /dev/fb).
X+    I've found that for monitors with higher resolution but same size
X+    (19" diagonal), I preferred using the pixels for other things than
X+    having fig occupying most of the screen.  Thus I opted for a fixed
X+    pixel-per-inch number which make fig window smaller on higher resolution
X+    monitor (than the standard sun monitor).  This however may change in
X+    the future version.
X+
X+(3) The rest of the file contains various objects.  An object can be one
X+    of six classes (or types).
X+
X+	  i)	Arc.
X+	 ii)	Ellipse which is a generalization of circle.
X+	iii)	Polyline which includes polygon and box.
X+	 iv)	Spline which includes closed/open control/interpolated spline.
X+	  v)	Text.
X+	 vi)	Compound object which is composed of one or more objects.
X+
X+    In the following elaboration on object formats, every value of fig
X+    output are separated by blank characters or new line ('\n').  The
X+    value of the not-used parameters will be -1.
X+
X+    A number of values are described as unused or not applicable to some
X+    object even though they are defined for those objects.  These value
X+    will (hopefully) be used in the future version of fig.  The intention
X+    of their uses are the following.
X+
X+	Value			Usage
X+	-----			-----
X+	area_fill	The stipple pattern (which will be align) for
X+			filling object internals.  For example, an filled
X+			arc will look like a piece of pie.
X+
X+	pen		This will be a structure defining the shape of
X+			pen used in drawing objects.  It also includes
X+			the the stipple pattern for line filling.
X+			The default pen is a circular pen with black
X+			filling.
X+
X+	thickness	Every pen has the thickness of one.
X+			Thickness scales the size of a pen. 
X+
X+	depth		This value adds a half dimension to fig.
X+			It is useful when we have overlapping filled
X+			objects and we want one to obliterate another.
X+			An object can have only one depth (including
X+			compound object).  An object that is in less
X+			depth can obscure the one with greater depth
X+			if they overlap.
X+	
X+	line_style	Only polyline (including polygon and box) can
X+			be rendered with dashed line.  However the
X+			objects created when the dash-line mode was on
X+			will be recorded as such.  Currently the filter
X+			f2ps (1) is able to render the desired line style
X+			effect on hard copy.  Three line styles are defined.
X+
X+				0 : SOLID_LINE
X+				1 : DASH_LINE
X+				2 : DOTTED_LINE
X+
X+	style_val	For dash style, it is the length of a dash.
X+			For dotted line it indicates the approximated
X+			gap of consecutive dots. 
X+
X+    (3.1) ARC
X+
X+    First line :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 5)
X+	int	sub_type		(always	1)
X+	int	line_style		(See the end of this section)
X+	int	line_thickness		(pixels, not used)
X+	int	color			(not used)
X+	int	depth			(not used)
X+	int	pen			(not used)
X+	int	area_fill		(not used)
X+	float	style_val		(pixels, not used)
X+	int	direction		(0 : clockwise, 1 : counterclockwise)
X+	int	forward_arrow		(0: no forward arrow, 1: on)
X+	int	backward_arrow		(0: no forward arrow, 1: on)
X+	float	center_x, center_y	(center of the arc)
X+	int	x1, y1			(pixels, the 1st point the user entered)
X+	int	x2, y2			(pixels, the 2nd point)
X+	int	x3, y3			(pixels, the last point)
X+
X+    Forward arrow line (Optional; absent if forward_arrow is 0) :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	arrow_type		(not used)
X+	int	arrow_style		(not used)
X+	int	arrow_thickness		(not used)
X+	int	arrow_width		(pixels)
X+	int	arrow_height		(pixels)
X+
X+    Backward arrow line (Optional; absent if backward_arrow is 0) :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	arrow_type		(not used)
X+	int	arrow_style		(not used)
X+	int	arrow_thickness		(not used)
X+	int	arrow_width		(pixels)
X+	int	arrow_height		(pixels)
X+
X+    (3.2) COMPOUND
X+
X+    A line with object code 6 signifies the start of a compound.
X+    There are four more numbers on this line which indicate the
X+    upper right corner and the lower left corner of the bounding
X+    box of this compound.  A line with object code -6 signifies
X+    the end of the compound.  Compound may be nested.
X+
X+    First line :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 6)
X+	int	upperright_corner_x	(pixels)
X+	int	upperright_corner_y	(pixels)
X+	int	lowerleft_corner_x	(pixels)
X+	int	lowerleft_corner_y	(pixels)
X+
X+    Subsequent lines :
X+	objects
X+	.
X+	.
X+
X+    Last line :
X+	-6
X+
X+    (3.3) ELLIPSE
X+
X+    First line :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 1)
X+	int	sub_type		(1 : ellipse defined by radiuses
X+					 2 : ellipse defined by diameters
X+					 3 : circle defined by radius
X+					 4 : circle defined by diameter)
X+	int	line_style		(See the end of this section)
X+	int	thickness		(pixels, not used)
X+	int	color			(not used)
X+	int	depth			(not used)
X+	int	pen			(not used)
X+	int	area_fill		(not used)
X+	float	style_val		(pixels, not used)
X+	int	direction		(always 1)
X+	float	angle			(radian, the angle of the x-axis)
X+	int	center_x, center_y	(pixels)
X+	int	radius_x, radius_y	(pixels)
X+	int	start_x, start_y	(pixels; the 1st point entered)
X+	int	end_x, end_y		(pixels; the last point entered)
X+
X+    (3.4) POLYLINE
X+
X+    First line :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 1)
X+	int	sub_type		(1 : polyline, 2 : box, 3 : polygon)
X+	int	line_style		(See the end of this section)
X+	int	thickness		(pixels, not used)
X+	int	color			(not used)
X+	int	depth			(not used)
X+	int	pen			(not used)
X+	int	area_fill		(not used)
X+	float	style_val		(pixels)
X+	int	forward_arrow		(0: off, 1: on)
X+	int	backward_arrow		(0: off, 1: on)
X+
X+    Forward arrow line : same as ARC object
X+
X+    Backward arrow line : same as ARC object
X+
X+    Points line :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	x1, y1			(pixels)
X+	int	x2, y2			(pixels)
X+	  .
X+	  .
X+	int	xn, yn			(this will be the same as the 1st
X+					point for polygon and box)
X+	int	x, y			(always 9999, 9999; marks the end of
X+					point for polygon and box)
X+
X+    (3.5) SPLINE
X+
X+    First line :
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object_code		(always 1)
X+	int	sub_type		(1 : open spline
X+					 2 : closed spline
X+					 3 : open interpolated spline
X+					 4 : closed interpolated spline)
X+	int	line_style		(See the end of this section)
X+	int	thickness		(pixels, not used)
X+	int	color			(not used)
X+	int	depth			(not used)
X+	int	pen			(not used)
X+	int	area_fill		(not used)
X+	float	style_val		(pixels, not used)
X+	int	forward_arrow		(0: off, 1: on)
X+	int	backward_arrow		(0: off, 1: on)
X+
X+    Forward arrow line : same as ARC object
X+
X+    Backward arrow line : same as ARC object
X+
X+    Points line : same as POLYLINE object
X+
X+    Control points line (absent if sub_type is 1 or 2) :
X+	Control points of interpolated spline.  There are two control
X+	points for each knots.  A section i, of the spline is drawn
X+	using Bezier cubic with the following four points:
X+		(x ,y ), (rx ,ry ), (lx	  , ly   ), (x   , y   ).
X+		  i  i	    i	i      i+1    i+1     i+1   i+1
X+	For closed interpolated spline the last pair of control points,
X+	(lxn,lyn) and (rxn,ryn) (which can be ignored), are the same as
X+	(lx1,ly1) and (rx1,ry1) respectively.
X+
X+	type	name			(brief description)
X+	----	----			-------------------
X+	float	lx1, ly1		(pixels)
X+	float	rx1, ry1		(pixels)
X+	float	lx2, ly2		(pixels)
X+	float	rx2, ry2		(pixels)
X+	  .
X+	  .
X+	float	lxn, lyn		(pixels)
X+	float	rxn, ryn		(pixels)
X+
X+    (3.6) TEXT
X+	type	name			(brief description)
X+	----	----			-------------------
X+	int	object 			(always 4)
X+	int	sub_type		(0 : Left justified
X+					 1 : Center justified
X+					 2 : Right justified)
X+	int	font 			(not used)
X+	int	font_size 		(not used)
X+	int	pen			(not used)
X+	int	color			(not used)
X+	int	depth			(not used)
X+	int	angle			(radian, not used, the angle of the
X+					the base line of the string)
X+	int	font_style		(not used)
X+	int	height			(pixels)
X+	int	length			(pixels)
X+	int	x, y			(pixels, coordinate of the origin
X+					 of the string.  If sub_type = 0, it is
X+					 the lower left corner of the string.
X+					 If sub_type = 1, it is the lower
X+					 center.  Otherwise it is the lower
X+					 right corner of the string.)
X+	char	string[]		(ascii characters; starts after a blank
X+					character following the last number and
X+					ends before the character '\1'.  This
X+					character is not part of the string.
X+					Note that the string may contain '\n'.)
END-of-pic2fig/patch-aa
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101180317.f0I3HTf03301>