This patch file should be applied (using the "patch" program) to TransFig 3.2.3 to bring it up to version 3.2.3b. Note that there is no version 3.2.3a of TransFig diff -rc transfig.3.2.3/CHANGES transfig.3.2.3b/CHANGES *** transfig.3.2.3/CHANGES Thu Jan 13 19:54:15 2000 --- transfig.3.2.3b/CHANGES Fri Jul 14 10:19:49 2000 *************** *** 3,14 **** Version 3.2 =============================================================================== Patchlevel 3 (Jan 14, 2000) [N.B. There was no transfig/fig2dev 3.2 patchlevel 2] NEW FEATURES o Adapted the transfig manual from LaTeX 2.09 to LaTeX 2e and uses ! Times/Helvetica/Courier instead of Computer Modern fonts. From Roland Rosenfeld (roland@spinnaker.de) o If DBM file for RGB databse does not exist, read "rgb.txt" instead. o If a file such as /usr/local/lib/fig2dev/A3.ps exists, insert it --- 3,85 ---- Version 3.2 =============================================================================== + Patchlevel 3b (July 19, 2000) + + N.B. There was no transfig 3.2.3a - I want to keep the release number identical + to that of the corresponding xfig. + + NEW FEATURES + o X11 Color database ASCII file (/usr/lib/X11/rgb.txt) is now used, + removing the need for the dbm_xxx functions. + o The \special code for colors in genlatex (LaTeX driver) replaced with + the \color code to be compatible with pdflatex and not require dvips + From Klaus Guntermann (guntermann@iti.informatik.tu-darmstadt.de) + o PCX image reader now handles 24-bit color which means that TIFF images + (which are converted to PCX first) may also be 24-bit + + BUGS FIXED + o Explicitely sets color to black before importing eps file in case that + file doesn't select a color + o Changed error message in epic driver from "Unknown style" to "Only + solid, dashed, and dotted line styles supported by epic(eepic)" + o Apostrophes (') in text are now escaped in CGM driver + from David Billinghurst (David.Billinghurst@riotinto.com.au) + o One of the header values for TIFF files was incorrect (was "DD", + should be "II") + o -f (font) option wasn't parsed correctly, which caused segfault + o Bug in handling imported xpm file colors in certain formats + o Multiple variables with same name in different drivers now declared + "static" + o In multi-page mode, redundant "Page: 1 1" was generated + o Unnecessary scaling in the pattern definitions removed (pdf/ps/eps + drivers) + o Total page number calculation was incorrect for multi-page PostScript + output + o Toplevel Imakefile referred to "make" instead of "$(MAKE)" + o Text object read routine had extra variable in scanf + o Error in calculation of arc arrowhead occluding underlying line; could + cause asin domain error + o Possible error in reading imported GIF colormap + o calc_arrow() didn't set nboundpts (number of points in bounding box) + if line having arrowhead had zero length + o Bug in Imakefile - jpeglib.h file couldn't be found for JPEG code if + USEXPM was not enabled. + o "Special" LaTeX text not included in bounding box anymore - this had + caused positioning problems with the LaTeX special text and figure + o "hyphen" was misspelled as "hypen" the character encoding for the + PostScript (and EPS/PDF) driver. + o One of the two TIFF file header types was incorrect + o Segfault when exporting to GIF if Fig file specified "none" for GIF + transparency + o Duplicate JPEG information in fig2dev/Imakefile + o If output from fig2dev was standard output, bitmap export formats + failed because of bad argument to ghostscript + o -P option description for PostScript removed from fig2dev man pages + o Error parsing certain color specs for XPM files + o Tightly curved, wide splines were sometimes "spikey" + o Bounding box wasn't taking arrowhead width(s) into account + o free_text now uses free() instead of less standard cfree() + o Changed last references to sys_errlist to use strerror() + o Bug in referencing imported xbm files in tk driver fixed + o Temporary file not closed before deleting in read_gif() and read_ppm() + o Formatting "%lf" in printf calls should be "%f" + o Prepended $(DESTDIR) to $(XFIGLIBDIR) and $(FIG2DEV_DIR) directory + variables in Imakefile to be portable + o Cleaned up extraneous and erroneous rules in fig2dev/Imakefile + from Pierre Humblet (Pierre.Humblet@eurecom.fr) + o Removed calls to external programs "cat" and "ps2pdf" to make more + portable to Cygwin environment + o fig2dev now uses gunzip instead of uncompress to uncompress .Z files + to be more portable for Cygwin environment + o Papersize sometimes truncated when reading Fig file + + ---------------------------- Patchlevel 3 (Jan 14, 2000) [N.B. There was no transfig/fig2dev 3.2 patchlevel 2] NEW FEATURES o Adapted the transfig manual from LaTeX 2.09 to LaTeX 2e and uses ! Times/Helvetica/Courier instead of Computer Modern fonts. From Roland Rosenfeld (roland@spinnaker.de) o If DBM file for RGB databse does not exist, read "rgb.txt" instead. o If a file such as /usr/local/lib/fig2dev/A3.ps exists, insert it *************** *** 32,38 **** o The default is now to compile for DVIPS o Arc-boxes available for LaTeX now from C. Scott Ananian ! o New import picture formats supported - TIFF and PPM BUGS FIXED o clipping and background filling incorrect for some Postscript/EPS --- 103,109 ---- o The default is now to compile for DVIPS o Arc-boxes available for LaTeX now from C. Scott Ananian ! o New import picture formats supported - TIFF and PPM BUGS FIXED o clipping and background filling incorrect for some Postscript/EPS *************** *** 70,82 **** those systems which don't have it (it is defined to use memset) o didn't include "pi.h" in dev/gentk.c for machines that don't have M_PI o Moved JPEGLIBDIR and JPEGINCDIR definition closer to the top in the ! fig2dev/Imakefile o Output to GIF, JPEG, etc. (bitmap formats) didn't work properly if the destination was stdout o "make install" changed because some systems' install program can only take one file at a time o Added a "newpath" command after the initial clip command for PostScript ! output just in case an object is drawn without a preceding newpath o M_2PI was redefined without first being #undef'd o the "-" character in Fig files should really be a hyphen, not a dash as it was encoded for PostScript output. This is fixed thanks to info --- 141,153 ---- those systems which don't have it (it is defined to use memset) o didn't include "pi.h" in dev/gentk.c for machines that don't have M_PI o Moved JPEGLIBDIR and JPEGINCDIR definition closer to the top in the ! fig2dev/Imakefile o Output to GIF, JPEG, etc. (bitmap formats) didn't work properly if the destination was stdout o "make install" changed because some systems' install program can only take one file at a time o Added a "newpath" command after the initial clip command for PostScript ! output just in case an object is drawn without a preceding newpath o M_2PI was redefined without first being #undef'd o the "-" character in Fig files should really be a hyphen, not a dash as it was encoded for PostScript output. This is fixed thanks to info *************** *** 177,183 **** several places in genepic.c draw_arrow_head is called with unconverted coordinates, which leads to totally displaced arrows. from Heiko Schroeder (heiko@linux.local.de) ! o cleanup of dictionary wrapped around imported EPS files from Franz Koch (franz.koch@zdv.uni-tuebingen.de) o pic output didn't produce dashed or dotted arc o metric flag incorrectly parsed --- 248,254 ---- several places in genepic.c draw_arrow_head is called with unconverted coordinates, which leads to totally displaced arrows. from Heiko Schroeder (heiko@linux.local.de) ! o cleanup of dictionary wrapped around imported EPS files from Franz Koch (franz.koch@zdv.uni-tuebingen.de) o pic output didn't produce dashed or dotted arc o metric flag incorrectly parsed *************** *** 205,215 **** NEW FEATURES o multi-page, paper size, magnification and transparent color stored in Fig ! file now. (transparent color is only used by xfig when exporting to GIF format) o comment that Redhat Linux users may have to change DBMLIB to -ldb in fig2dev/Imakefile ! o figures in landscape are only rotated when showpage command is NOT used (-P). This is because it doesn't need to be rotated for EPS, o previous spline models (interpolated splines and approximated splines) are replaced by one single model (x-splines) which allows the user to mix --- 276,286 ---- NEW FEATURES o multi-page, paper size, magnification and transparent color stored in Fig ! file now. (transparent color is only used by xfig when exporting to GIF format) o comment that Redhat Linux users may have to change DBMLIB to -ldb in fig2dev/Imakefile ! o figures in landscape are only rotated when showpage command is NOT used (-P). This is because it doesn't need to be rotated for EPS, o previous spline models (interpolated splines and approximated splines) are replaced by one single model (x-splines) which allows the user to mix *************** *** 244,250 **** The old restriction is not needed because the epsfig package is required to include ps_tex_t files anyway. o new line types - Dash-dot (_.) Dash-dot-dot (_..) and Dash-dot-dot-dot (_...) ! o new paper sizes: "Tabloid", "Ledger", "B", "C", "D", "E", "A0", "A1", "A2", "A3", "A4" and "B5". See man fig2dev (-z option) for sizes in inches and cm --- 315,321 ---- The old restriction is not needed because the epsfig package is required to include ps_tex_t files anyway. o new line types - Dash-dot (_.) Dash-dot-dot (_..) and Dash-dot-dot-dot (_...) ! o new paper sizes: "Tabloid", "Ledger", "B", "C", "D", "E", "A0", "A1", "A2", "A3", "A4" and "B5". See man fig2dev (-z option) for sizes in inches and cm *************** *** 320,326 **** o recursion bug fixed where run-time would increase exponentially with nesting of compound objects o %%BeginDocument:/EndDocument now surrounds imported EPS files ! o open arrowheads on arcs were overwritten by arc lines o bug in pattern fill code which made patterns appear solid black when using dvips Thanks to Tomas Rokicki (rokicki@CS.Stanford.EDU) for finding the fix --- 391,397 ---- o recursion bug fixed where run-time would increase exponentially with nesting of compound objects o %%BeginDocument:/EndDocument now surrounds imported EPS files ! o open arrowheads on arcs were overwritten by arc lines o bug in pattern fill code which made patterns appear solid black when using dvips Thanks to Tomas Rokicki (rokicki@CS.Stanford.EDU) for finding the fix *************** *** 340,346 **** Add -DNFSS to DEFINES list to use NFSS2 font selection for LaTeX texts Add -DEPSF to DEFINES list to use epsfig macros as distributed w/ LaTeX2e ! Hint: Users of LaTeX2e will probably want to include both of these options; users of LaTeX 2.09 will probably want to include neither. --- 411,417 ---- Add -DNFSS to DEFINES list to use NFSS2 font selection for LaTeX texts Add -DEPSF to DEFINES list to use epsfig macros as distributed w/ LaTeX2e ! Hint: Users of LaTeX2e will probably want to include both of these options; users of LaTeX 2.09 will probably want to include neither. *************** *** 392,398 **** o NOTE: An error in xfig version 3.0.0 incorrectly positioned objects on the canvas when reading older fig files. New objects entered with 3.0 are ! correctly positioned. I apologize for the inconvenience. ***** This is the only reason why the file protocol number has changed. --- 463,469 ---- o NOTE: An error in xfig version 3.0.0 incorrectly positioned objects on the canvas when reading older fig files. New objects entered with 3.0 are ! correctly positioned. I apologize for the inconvenience. ***** This is the only reason why the file protocol number has changed. *************** *** 509,517 **** o specifing nonexistant font with -f caused coredump from Gordon W. Ross (gwr@jericho.mc.com) o newpath command given before EPS object for PostScript output ! o moved definition of SetFigFont to better place from Bernd Raichle (raichle@isr.uni-stuttgart.de) ! o #included sys/types for BSD4_3 systems in genps.c o bug in eepic output - SetFigFont was being defined inside a \put from Vivek Khera (khera@cs.duke.edu) o BoundingBox for EPS objects can be floating values --- 580,588 ---- o specifing nonexistant font with -f caused coredump from Gordon W. Ross (gwr@jericho.mc.com) o newpath command given before EPS object for PostScript output ! o moved definition of SetFigFont to better place from Bernd Raichle (raichle@isr.uni-stuttgart.de) ! o #included sys/types for BSD4_3 systems in genps.c o bug in eepic output - SetFigFont was being defined inside a \put from Vivek Khera (khera@cs.duke.edu) o BoundingBox for EPS objects can be floating values *************** *** 519,525 **** o distribution version of fig2dev/dev/Makefile had (def_)setfigfont.c instead of (def_)setfigfont.o in LIBOBJS definition o SUBDIR fig2dev/dev was missing from top-level Imakefile caused problems ! where make would say something like "No rule to make target dev/libtransfig.a" --------------------------------------------------------------------------- --- 590,596 ---- o distribution version of fig2dev/dev/Makefile had (def_)setfigfont.c instead of (def_)setfigfont.o in LIBOBJS definition o SUBDIR fig2dev/dev was missing from top-level Imakefile caused problems ! where make would say something like "No rule to make target dev/libtransfig.a" --------------------------------------------------------------------------- *************** *** 536,546 **** to "%!PS-Adobe-2.0 EPSF-2.0" which allows FrameMaker and ghostview to read them properly. from Vivek Khera (khera@cs.duke.edu) ! o check for #ifdef SYSV to include string.h instead of strings.h in fig2dev/dev/genibmgl.c ! o changed EXTRA_LIBRARIES to SYS_LIBRARIES in fig2dev/Imakefile so wouldn't clobber system-dependent flags in EXTRA_LIBRARIES ! o fprintf and 'else' missing from genepic which caused incorrect information to be generated when drawing arcs using epic output o removed dependencies on the X libraries (Imakefiles and Makefiles) o SGI machines had trouble with hypot() which caused arrow heads to mess up --- 607,617 ---- to "%!PS-Adobe-2.0 EPSF-2.0" which allows FrameMaker and ghostview to read them properly. from Vivek Khera (khera@cs.duke.edu) ! o check for #ifdef SYSV to include string.h instead of strings.h in fig2dev/dev/genibmgl.c ! o changed EXTRA_LIBRARIES to SYS_LIBRARIES in fig2dev/Imakefile so wouldn't clobber system-dependent flags in EXTRA_LIBRARIES ! o fprintf and 'else' missing from genepic which caused incorrect information to be generated when drawing arcs using epic output o removed dependencies on the X libraries (Imakefiles and Makefiles) o SGI machines had trouble with hypot() which caused arrow heads to mess up *************** *** 547,560 **** from Malcolm Davis (davis@nod.bms.com) o Flipped EPS objects were incorrectly flipped on output from Brian Boyter (boyter@pyrdc.va.pyramid.com) ! o POLYLINES were being drawn in sections (10 points per section) which ! resulted in incorrect dashed line lengths and only one section filled if area fill was on from Peter Egelberg (egel@neural.se) o added Sequent machines and Suns with SunOs < 4.1 to list of machines that don't have strstr() from Scott Erikson (sources@ics.uci.edu) ! o removed PATCHLEVEL from patchlevel.h file - version number is complete with three parts (e.g. 2.1.6) o removed "extern coord_system" from fig2dev.h (wasn't used by fig2dev) o SPECIAL_CHAR split into three strings for systems which can't handle one --- 618,631 ---- from Malcolm Davis (davis@nod.bms.com) o Flipped EPS objects were incorrectly flipped on output from Brian Boyter (boyter@pyrdc.va.pyramid.com) ! o POLYLINES were being drawn in sections (10 points per section) which ! resulted in incorrect dashed line lengths and only one section filled if area fill was on from Peter Egelberg (egel@neural.se) o added Sequent machines and Suns with SunOs < 4.1 to list of machines that don't have strstr() from Scott Erikson (sources@ics.uci.edu) ! o removed PATCHLEVEL from patchlevel.h file - version number is complete with three parts (e.g. 2.1.6) o removed "extern coord_system" from fig2dev.h (wasn't used by fig2dev) o SPECIAL_CHAR split into three strings for systems which can't handle one *************** *** 570,574 **** o changed header for postscript files from "%!" to "%!PS-Adobe-2.0" when using -P (showpage) option and "%!PS-Adobe-2.0 EPSF" otherwise (Encapsulated) o corrupt transfig/Imakefile and typo (SCRS instead of SRCS) ! o some variables (cur_thickness and coord_system) were multiply defined in various drivers in fig2dev/dev - made those static --- 641,645 ---- o changed header for postscript files from "%!" to "%!PS-Adobe-2.0" when using -P (showpage) option and "%!PS-Adobe-2.0 EPSF" otherwise (Encapsulated) o corrupt transfig/Imakefile and typo (SCRS instead of SRCS) ! o some variables (cur_thickness and coord_system) were multiply defined in various drivers in fig2dev/dev - made those static diff -rc transfig.3.2.3/Imakefile transfig.3.2.3b/Imakefile *** transfig.3.2.3/Imakefile Mon Jan 3 10:33:52 2000 --- transfig.3.2.3b/Imakefile Wed Apr 12 09:15:18 2000 *************** *** 40,46 **** transfig.man:: doc/transfig.1 -ln -s ../doc/transfig.1 transfig.man ! cd doc/manual; make; latex manual; latex manual clean:: ! cd doc/manual; make clean --- 40,46 ---- transfig.man:: doc/transfig.1 -ln -s ../doc/transfig.1 transfig.man ! cd doc/manual; $(MAKE); latex manual; latex manual clean:: ! cd doc/manual; $(MAKE) clean diff -rc transfig.3.2.3/README transfig.3.2.3b/README *** transfig.3.2.3/README Thu Jan 13 19:56:09 2000 --- transfig.3.2.3b/README Fri Jul 14 10:37:08 2000 *************** *** 1,5 **** - Announcing the release of TransFig version 3.2.3 January 14, 2000 - TransFig is a set of tools for creating TeX documents with graphics which are portable, in the sense that they can be printed in a wide variety of environments. --- 1,3 ---- *************** *** 47,131 **** 5. Do a "make install" to install them in the system 6. Do a "make install.man" to put the manual pages in the proper directories ! Uncomment the USELATEX2E flag in the transfig/Imakefile file to use the ! \\usepackage{} command for LaTeX2e. ! The default is to use \\documentstyle{} for LaTeX209. ! ! In fig2dev/Imakefile for the described features: ! Comment out the DDNFSS = ... line if you don't want NFSS2 font selection ! for LaTeX texts. ! Comment out the DDLATEX2E_GRAPHICS = ... line if you don't want to use the ! standard graphics package distributed w/ LaTeX2e. ! UNcomment the DDEPSFIG = ... line if you want to use the deprecated epsfig macros ! distributed w/ LaTeX2e (DDLATEX2E_GRAPHICS must also be defined). Hint: Users of LaTeX2e will probably want to include both of these options; users of LaTeX 2.09 will probably want to include neither. ! If your system doesn't have strcasecmp() and/or strncasecmp(), uncomment the ! lines in the Imakefile with HAVE_NO_STRCASECMP and HAVE_NO_STRNCASECMP. ! If your system doesn't have strstr(3) uncomment the "#define NOSTRSTR" ! ---------------------------------------------------------------------------- *************** IMPORTANT NOTE: ! As of version 3.2.0 (final), fig2dev has taken over the translating of Fig ! to the bitmap formats (ACAD, GIF, JPEG, XPM, XBM, PCX, TIFF). ! In the past, xfig itself rendered the bitmap formats. This change was made ! to have a more consistent look and better fonts. First, the Fig file is ! translated to PostScript, then ghostscript is used to render the image to ! the final format in the case of JPEG, PCX and TIFF, or to PPM (portable ! pixmap) after which the appropriate ppmtoXXX filter is used to get ACAD, GIF, ! XPM and XBM. If smoothing is done (-S option) when jpeg output is used, the ! "cjpeg" program must be installed from the jpeg package. This is done ! automatically when you "make" TransFig or fig2dev. ! ! You need the netpbm package of March 1994 (or later), which you can find on ! ftp.x.org in /contrib/utilities or on ftp.cdrom.com in ! /pub/X11/contrib/utilities. ! ! You will also need ghostscript, which can be found on ftp.cs.wisc.edu in ! /ghost/aladdin, *AND* it must be compiled with the pcx256, jpeg, png256, ppmraw ! and tiff24nc drivers. ! *************** ! ---------------------------------------------------------------------------- ! Make sure that you point XFIGLIBDIR to the same directory that xfig uses ! (usually /usr/local/lib/xfig). This will be used to hold the bitmaps directory ! for the tk fill patterns. ! ---------------------------------------------------------------------------- ! If you have NOT installed the JPEG library in your system library area, comment ! out the USEINSTALLEDJPEG in fig2dev/Imakefile variable, change the JPEGLIBDIR ! variable to the directory where your JPEG library resides and change the ! JPEGINCDIR to the directory where your JPEG header files (include) reside. ! You must have version 5b or newer of the JPEG library. ! ! The JPEG library is available from several places. The official archive site ! is ftp.uu.net in /graphics/jpeg. ! Another site is ftp.x.org in /contrib/libraries. ! ! If you don't want to be able to import JPEG images in your Fig files at all ! then comment out the "#define USEJPEG" line in the fig2dev/Imakefile. ! ---------------------------------------------------------------------------- ! If you want to be able to translate Fig files that have imported XPM files ! (color pixmaps) uncomment the "#define USEXPM" line in fig2dev/Imakefile. ! You need version 3.4c or newer of the XPM package. ! This is available from ftp.x.org in /contrib/libraries. ! ---------------------------------------------------------------------------- ! Uncomment the "DBMLIB = -lgdbm" in fig2dev/Imakefile if your dbm routines are ! in their own library. ! For the Redhat distributions of Linux you may have to change DBMLIB to -ldb. ! For some Linuxes you may need to change it to "DBMLIB = -ldbm". ! Slackware Linuxes use -lgdbm. ! ---------------------------------------------------------------------------- ! If your system has the strerror() function (doesn't have sys_errlist) then ! comment out NEED_STRERROR with an XCOMM comment. ! ---------------------------------------------------------------------------- ! Look in the Imakefiles to see if any options are relevant to your system. ! ---------------------------------------------------------------------------- ! ** If you use epic, eepic or tpic you must have compiled your dvips and xvdi ! ** with the tpic support (-DTPIC for dvips). ************************************************************************* Please send email about any questions/bug fixes/contributions etc. about --- 45,126 ---- 5. Do a "make install" to install them in the system 6. Do a "make install.man" to put the manual pages in the proper directories ! o Uncomment the USELATEX2E flag in the transfig/Imakefile file to use the ! \\usepackage{} command for LaTeX2e. ! The default is to use \\documentstyle{} for LaTeX209. ! ! o In fig2dev/Imakefile for the described features: ! ! o Comment out the DDNFSS = ... line if you don't want NFSS2 font selection ! for LaTeX texts. ! o Comment out the DDLATEX2E_GRAPHICS = ... line if you don't want to use the ! standard graphics package distributed w/ LaTeX2e. ! o UNcomment the DDEPSFIG = ... line if you want to use the deprecated epsfig macros ! distributed w/ LaTeX2e (DDLATEX2E_GRAPHICS must also be defined). Hint: Users of LaTeX2e will probably want to include both of these options; users of LaTeX 2.09 will probably want to include neither. ! o If your system doesn't have strcasecmp() and/or strncasecmp(), uncomment the ! lines in the Imakefile with HAVE_NO_STRCASECMP and HAVE_NO_STRNCASECMP. ! ! o If your system doesn't have strstr(3) uncomment the "#define NOSTRSTR" ! ! o Make sure that you point XFIGLIBDIR to the same directory that xfig uses ! (usually /usr/local/lib/xfig). This will be used to hold the bitmaps ! directory for the tk fill patterns. ! ! o If you have NOT installed the JPEG library in your system library area, ! comment out the USEINSTALLEDJPEG in fig2dev/Imakefile variable, change the ! JPEGLIBDIR variable to the directory where your JPEG library resides and ! change the JPEGINC to the directory where your JPEG header files (include) ! reside. You must have version 5b or newer of the JPEG library. ! ! The JPEG library is available from several places. The official archive site ! is ftp.uu.net in /graphics/jpeg. ! Another site is ftp.x.org in /contrib/libraries. ! ! o If you don't want to be able to import JPEG images in your Fig files at all ! then comment out the "#define USEJPEG" line in the fig2dev/Imakefile. ! o If you want to be able to translate Fig files that have imported XPM files ! (color pixmaps) uncomment the "#define USEXPM" line in fig2dev/Imakefile. ! You need version 3.4c or newer of the XPM package. ! This is available from ftp.x.org in /contrib/libraries. ! o If your system has the strerror() function (doesn't have sys_errlist) then ! comment out NEED_STRERROR with an XCOMM comment. ! ! o If your system can open files in text and binary modes and has the setmode() ! function, uncomment HAVE_SETMODE. This probably only applies to Windows 9x/NT ! systems. ! ! o Look in the Imakefiles to see if any options are relevant to your system. ! ! o If you use epic, eepic or tpic you must have compiled your dvips and xvdi ! with the tpic support (-DTPIC for dvips). ! *************** IMPORTANT NOTE: ! o As of version 3.2.0 (final), fig2dev has taken over the translating of Fig ! to the bitmap formats (ACAD, GIF, JPEG, XPM, XBM, PCX, TIFF). ! In the past, xfig itself rendered the bitmap formats. This change was made ! to have a more consistent look and better fonts. First, the Fig file is ! translated to PostScript, then ghostscript is used to render the image to ! the final format in the case of JPEG, PCX and TIFF, or to PPM (portable ! pixmap) after which the appropriate ppmtoXXX filter is used to get ACAD, GIF, ! XPM and XBM. If smoothing is done (-S option) when jpeg output is used, the ! "cjpeg" program must be installed from the jpeg package. This is done ! automatically when you "make" TransFig or fig2dev. ! ! o You need the netpbm package of March 1994 (or later), which you can find ! at ftp://ftp.x.org/contrib/utilities or ! at ftp://ftp.cdrom.com/pub/X11/contrib/utilities. ! ! o You will also need ghostscript, which can be found on ftp.cs.wisc.edu in ! /ghost/aladdin, *AND* it must be compiled with the pcx256, jpeg, png256, ! ppmraw and tiff24nc drivers. ************************************************************************* Please send email about any questions/bug fixes/contributions etc. about diff -rc transfig.3.2.3/doc/fig2dev.1 transfig.3.2.3b/doc/fig2dev.1 *** transfig.3.2.3/doc/fig2dev.1 Thu Jan 13 19:51:10 2000 --- transfig.3.2.3b/doc/fig2dev.1 Fri Jul 14 10:20:10 2000 *************** *** 1,4 **** ! .TH FIG2DEV 1 "Version 3.2.3 Jan 14, 2000" .SH NAME fig2dev \- translates Fig code to various graphics languages --- 1,4 ---- ! .TH FIG2DEV 1 "Version 3.2.3b July 19, 2000" .SH NAME fig2dev \- translates Fig code to various graphics languages *************** *** 10,16 **** .B \-m .I mag ] [ ! .B \-f .I font ] [ .B \-s --- 10,16 ---- .B \-m .I mag ] [ ! .B \-f .I font ] [ .B \-s *************** *** 24,30 **** .I Fig2dev translates fig code in the named .I fig-file ! into the specified graphics .I language and puts them in .I out-file. --- 24,30 ---- .I Fig2dev translates fig code in the named .I fig-file ! into the specified graphics .I language and puts them in .I out-file. *************** *** 35,43 **** are standard input and standard output, respectively .LP Xfig (Facility for Interactive Generation of figures) is a screen-oriented ! tool which runs under the X Window System, and allows the user to draw and manipulate objects interactively. ! This version of fig2dev is compatible with xfig versions 1.3, 1.4, 2.0, 2.1, 3.0, 3.1 and 3.2. .LP Xfig version 3.2.3 and later saves and allows the user to edit comments --- 35,43 ---- are standard input and standard output, respectively .LP Xfig (Facility for Interactive Generation of figures) is a screen-oriented ! tool which runs under the X Window System, and allows the user to draw and manipulate objects interactively. ! This version of fig2dev is compatible with xfig versions 1.3, 1.4, 2.0, 2.1, 3.0, 3.1 and 3.2. .LP Xfig version 3.2.3 and later saves and allows the user to edit comments *************** *** 50,56 **** .B \-L Set the output graphics language. Valid languages are ! \fBbox, cgm, epic, eepic, eepicemu, eps, gif, ibmgl, jpeg, latex, map (HTML image map), mf (METAFONT), pcx, pdf, pic, pictex, png, ppm, ps, pstex, pstex_t, sld (AutoCad slide format), textyl, \fR tiff, tk (tcl/tk), tpic, xbm and --- 50,56 ---- .B \-L Set the output graphics language. Valid languages are ! \fBbox, cgm, epic, eepic, eepicemu, eps, gif, ibmgl, jpeg, latex, map (HTML image map), mf (METAFONT), pcx, pdf, pic, pictex, png, ppm, ps, pstex, pstex_t, sld (AutoCad slide format), textyl, \fR tiff, tk (tcl/tk), tpic, xbm and *************** *** 70,82 **** .TP .B \-h Print help message with all options for all output languages. .TP ! .B \-m Set the magnification at which the figure is rendered to .I mag. The default is 1.0. .TP ! .B \-f Set the default font used for text objects to .I font. The default is Roman; the format of this option depends on the graphics --- 70,84 ---- .TP .B \-h Print help message with all options for all output languages. + .TP ! .B "\-m mag" Set the magnification at which the figure is rendered to .I mag. The default is 1.0. + .TP ! .B "\-f font" Set the default font used for text objects to .I font. The default is Roman; the format of this option depends on the graphics *************** *** 85,99 **** In TeX-based languages, the font is the base of the name given in lfonts.tex, for instance "cmr" for Roman, or "tt" for teletype. In PostScript, it is any font name known to the printer or interpreter. .TP ! .B \-s Set the default font size (in points) for text objects to .I fsize. The default is 11*mag, and thus is scaled by the \fB-m\fR option. If there is no scaling, the default font is eleven point Roman." .TP .B \-V Print the program version number only. .TP .I other options The other options are specific to the choice of graphics --- 87,104 ---- In TeX-based languages, the font is the base of the name given in lfonts.tex, for instance "cmr" for Roman, or "tt" for teletype. In PostScript, it is any font name known to the printer or interpreter. + .TP ! .B "\-s size" Set the default font size (in points) for text objects to .I fsize. The default is 11*mag, and thus is scaled by the \fB-m\fR option. If there is no scaling, the default font is eleven point Roman." + .TP .B \-V Print the program version number only. + .TP .I other options The other options are specific to the choice of graphics *************** *** 106,120 **** other products can import this format .I and display it on the screen, something that they won't do with EPS files that have an ASCII preview. .TP .B \-r Position arrowheads for CGM viewers that display rounded arrowheads. Normally, arrowheads are pointed, so fig2dev compensates for this by ! moving the endpoint of the line back so the tip of the arrowhead ends where the original endpoint of the line was. If the \fB-r\fR option is used, the position of arrows will \fINOT\fR be corrected for compensating line width effects, ! because the rounded arrowhead doesn't extend beyond the endpoint of the line. .SH EPIC OPTIONS EPIC is an enhancement to LaTeX picture drawing environment. It was developed by Sunil Podar of Department of Computer Science --- 111,126 ---- other products can import this format .I and display it on the screen, something that they won't do with EPS files that have an ASCII preview. + .TP .B \-r Position arrowheads for CGM viewers that display rounded arrowheads. Normally, arrowheads are pointed, so fig2dev compensates for this by ! moving the endpoint of the line back so the tip of the arrowhead ends where the original endpoint of the line was. If the \fB-r\fR option is used, the position of arrows will \fINOT\fR be corrected for compensating line width effects, ! because the rounded arrowhead doesn't extend beyond the endpoint of the line. .SH EPIC OPTIONS EPIC is an enhancement to LaTeX picture drawing environment. It was developed by Sunil Podar of Department of Computer Science *************** *** 126,131 **** --- 132,138 ---- Computer Science at University of California, Davis. .LP EEPIC-EMU is an EEPIC emulation package which does not use tpic specials. + .TP .B \-A Scale arrowheads by *************** *** 138,151 **** double the size of .I TeX arrowheads. .TP .B \-l ! Use "\fB\\thicklines\fR" when width of the line is wider than .I lwidth. The default is 2. .TP .B \-v Include comments in the output file. .TP .B \-P Generate a complete LaTeX file. In other words, the output file can be --- 145,161 ---- double the size of .I TeX arrowheads. + .TP .B \-l ! Use "\fB\\thicklines\fR" when width of the line is wider than .I lwidth. The default is 2. + .TP .B \-v Include comments in the output file. + .TP .B \-P Generate a complete LaTeX file. In other words, the output file can be *************** *** 152,172 **** formatted without requiring any changes. The additional text inserted in the beginning and at the end of the file is controlled by the configuration parameter "Preamble" and "Postamble". .TP .B \-S Set the scale to which the figure is rendered. ! This option automatically sets the .I magnification and size to .I scale ! / 12 and .I scale respectively. .TP .B \-W Enable variable line width. By default, only two line widths are available: The normal line width (\thinlines), and thick ! lines (\thicklines), if a line width of more than one is selected in xfig. .TP .B \-w Disable variable line width. Only "\fB\\thicklines\fR" and/or --- 162,185 ---- formatted without requiring any changes. The additional text inserted in the beginning and at the end of the file is controlled by the configuration parameter "Preamble" and "Postamble". + .TP .B \-S Set the scale to which the figure is rendered. ! This option automatically sets the .I magnification and size to .I scale ! / 12 and .I scale respectively. + .TP .B \-W Enable variable line width. By default, only two line widths are available: The normal line width (\thinlines), and thick ! lines (\thicklines), if a line width of more than one is selected in xfig. ! .TP .B \-w Disable variable line width. Only "\fB\\thicklines\fR" and/or *************** *** 188,200 **** --- 201,216 ---- .SH IBM-GL OPTIONS IBM-GL (International Business Machines Graphics Language) is compatible with HP-GL (Hewlett-Packard Graphics Language). + .TP .B \-a Select ISO A4 (ANSI A) paper size if the default is ANSI A (ISO A4) paper size. + .TP .B \-c Generate instructions for an IBM 6180 Color Plotter with (without) an IBM Graphics Enhancement Cartridge (IBM-GEC). + .TP .B \-d Restrict plotting to a rectangular area of the plotter paper which has *************** *** 205,210 **** --- 221,227 ---- All four numbers are in inches and follow \fB-d\fR in a comma-sparated list - .I xll,yll,xur,yur - with no spaces between them. + .TP .B \-f Load text character specifications from the table in the *************** *** 218,223 **** --- 235,241 ---- 3.) character slant angle (degrees), 4.) character width scale factor and 5.) character height scale factor. + .TP .B \-l Load area fill line patterns from the table in the *************** *** 230,240 **** --- 248,260 ---- 3.) fill type (1 - 5), 4.) fill spacing (inches) and 5.) fill angle (degrees). + .TP .B \-m The magnification may appear as the first element in a comma separated list - .I mag,x0,y0 - where the second and third parameters specify an offset in inches. + .TP .B \-p Load plotter pen specifications from the table in the *************** *** 244,257 **** --- 264,280 ---- Each entry consists of 2 numbers which specify the 1.) pen number (1 - 8) and 2.) pen thickness (millimeters). + .TP .B \-P Rotate the figure to portrait mode. The default is landscape mode. + .TP .B \-S Set the pen speed to .I speed (centimeters/second). + .TP .B \-v Plot the figure upside-down in portrait mode or backwards in landscape mode. *************** *** 266,280 **** The \fB-c\fR option selects the alternate instruction set. .SH OPTIONS COMMON TO ALL BITMAP FORMATS .TP .B -b borderwidth ! Make blank border around figure of width .I borderwidth. .TP .B -g color Use .I color for the background. .TP .B -S smoothfactor This will smooth the output by scaling the figure by the --- 289,306 ---- The \fB-c\fR option selects the alternate instruction set. .SH OPTIONS COMMON TO ALL BITMAP FORMATS + .TP .B -b borderwidth ! Make blank border around figure of width .I borderwidth. + .TP .B -g color Use .I color for the background. + .TP .B -S smoothfactor This will smooth the output by scaling the figure by the *************** *** 282,303 **** factor, which forces ghostscript to render the figure at the higher scale to improve font rendering, then passing through pnmscale to reduce to original size, which also smooths the image by averaging colors of adjacent pixels. ! A value of 2 or 3 for .I smoothfactor is reasonable. xfig uses 2 when the "smooth" option is used in the export panel. .SH GIF OPTIONS .TP .B -t color Use .I color for the transparent color in the GIF file. This must be specified ! as a six-digit hexadecimal RGBvalue with the # sign, e.g. #ff0000 (Red). .SH JPEG OPTIONS .TP .B -q image_quality ! use the integer value .I image_quality for the JPEG "Quality" factor. Valid values are 0-100. --- 308,332 ---- factor, which forces ghostscript to render the figure at the higher scale to improve font rendering, then passing through pnmscale to reduce to original size, which also smooths the image by averaging colors of adjacent pixels. ! A value of 2 or 3 for .I smoothfactor is reasonable. xfig uses 2 when the "smooth" option is used in the export panel. .SH GIF OPTIONS + .TP .B -t color Use .I color for the transparent color in the GIF file. This must be specified ! in the same format that ppmmake(1) allows. ! It may allow an X11 color name, but at least you may use ! a six-digit hexadecimal RGBvalue using the # sign, e.g. #ff0000 (Red). .SH JPEG OPTIONS .TP .B -q image_quality ! use the integer value .I image_quality for the JPEG "Quality" factor. Valid values are 0-100. *************** *** 305,311 **** .SH LATEX OPTIONS .TP .B \-l ! Sets the threshold between LaTeX thin and thick lines to .I lwidth pixels. LaTeX supports only two different line width: \\thinlines and \\thicklines. --- 334,340 ---- .SH LATEX OPTIONS .TP .B \-l ! Sets the threshold between LaTeX thin and thick lines to .I lwidth pixels. LaTeX supports only two different line width: \\thinlines and \\thicklines. *************** *** 335,356 **** The fig2dev map output language will produce an HTML image map using Fig objects that have href="some_html_reference" in their comments. Any Fig object except compound objects may used for this. ! Usually, besides generating the map file, you would also generate a GIF file, which is the image to which the map refers. .sp ! For example, you may have an xfig drawing with an imported image that has the comment href="go_here.html" and a box object with a comment href="go_away.html". This will produce an image map file such the user ! may click on the image and the browser will load the "go_here.html" page, or click on the box and the browser will load the "go_away.html" page. .sp ! After the map file is generated by .I fig2dev you will need to edit it to fill out any additional information it may need. .TP .B -b borderwidth ! Make blank border around figure of width .I borderwidth. --- 364,385 ---- The fig2dev map output language will produce an HTML image map using Fig objects that have href="some_html_reference" in their comments. Any Fig object except compound objects may used for this. ! Usually, besides generating the map file, you would also generate a GIF file, which is the image to which the map refers. .sp ! For example, you may have an xfig drawing with an imported image that has the comment href="go_here.html" and a box object with a comment href="go_away.html". This will produce an image map file such the user ! may click on the image and the browser will load the "go_here.html" page, or click on the box and the browser will load the "go_away.html" page. .sp ! After the map file is generated by .I fig2dev you will need to edit it to fill out any additional information it may need. .TP .B -b borderwidth ! Make blank border around figure of width .I borderwidth. *************** *** 359,365 **** scales the figure by 1/8 before generating METAFONT code. The magnification can be further changed with the .B -m ! option or by giving magnification options to .B mf. .LP In order to process the generated METAFONT code, the mfpic macros --- 388,394 ---- scales the figure by 1/8 before generating METAFONT code. The magnification can be further changed with the .B -m ! option or by giving magnification options to .B mf. .LP In order to process the generated METAFONT code, the mfpic macros *************** *** 380,386 **** original figure. The default is 1. .TP .B -t top ! specifies the top of the whole coordinate system. The default is .B ypos. .TP .B -x xneg --- 409,415 ---- original figure. The default is 1. .TP .B -t top ! specifies the top of the whole coordinate system. The default is .B ypos. .TP .B -x xneg *************** *** 389,395 **** .TP .B -y yneg specifies the minumum y coordinate value of the figure (inches). The ! default is 0. .TP .B -X xpos specifies the maximum x coordinate value of the figure (inches). The --- 418,424 ---- .TP .B -y yneg specifies the minumum y coordinate value of the figure (inches). The ! default is 0. .TP .B -X xpos specifies the maximum x coordinate value of the figure (inches). The *************** *** 417,423 **** .br \fBall\fR Use all of the above .br ! \fBpsfont\fR Don't convert Postscript fonts generic type (useful for files going to be Ditroff'ed for and printed on PS printer). DWB-compatible. .br --- 446,452 ---- .br \fBall\fR Use all of the above .br ! \fBpsfont\fR Don't convert Postscript fonts generic type (useful for files going to be Ditroff'ed for and printed on PS printer). DWB-compatible. .br *************** *** 456,464 **** o The centering option is ignored .br o The multiple-page option is ignored ! .br o The paper size option is ignored ! .br o The x/y offset options are ignored .LP The PDF driver uses all the PostScript options. --- 485,493 ---- o The centering option is ignored .br o The multiple-page option is ignored ! .br o The paper size option is ignored ! .br o The x/y offset options are ignored .LP The PDF driver uses all the PostScript options. *************** *** 480,490 **** Filled objects are printed using the given area fill and color. There are 21 "shades" going from black to full saturation of the fill color, and 21 more "tints" from full saturation + 1 to white. ! In addition, there are 16 patterns such as bricks, diagonal lines, crosshatch, etc. .TP .B -b borderwidth ! Make blank border around figure of width .I borderwidth. .TP .B -c --- 509,519 ---- Filled objects are printed using the given area fill and color. There are 21 "shades" going from black to full saturation of the fill color, and 21 more "tints" from full saturation + 1 to white. ! In addition, there are 16 patterns such as bricks, diagonal lines, crosshatch, etc. .TP .B -b borderwidth ! Make blank border around figure of width .I borderwidth. .TP .B -c *************** *** 507,515 **** This option will override the orientation specification in the file (for file versions 3.0 and higher). .br ! This option is only honored when not using the -P option (add showpage). ! This is because the figure doesn't need to be rotated when generating ! Encapsulated PostScript (EPS). .TP .B -M Generate multiple pages if figure exceeds paper size. --- 536,545 ---- This option will override the orientation specification in the file (for file versions 3.0 and higher). .br ! This and the -p (portrait) option are only honored only for PostScript output, ! not Encapsulated PostScript (EPS). ! This is because the figure doesn't need to be rotated when generating (EPS); ! it may be rotated by the program importing the EPS. .TP .B -M Generate multiple pages if figure exceeds paper size. *************** *** 521,533 **** file (for file versions 3.0 and higher). This is the default for Fig files of version 2.1 or lower. .TP - .B -P - indicates that the figure describes a full page which will not - necessarily be inserted into a document, but can be sent directly - to a PS printer. - This ensures that a showpage command is inserted at the end of - the figure. - .TP .B -n name Set the Title part of the PostScript output to .I name. --- 551,556 ---- *************** *** 659,666 **** documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting ! documentation. The authors make no representations about the suitability ! of this software for any purpose. It is provided "as is" without express or implied warranty. .LP THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, --- 682,689 ---- documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting ! documentation. The authors make no representations about the suitability ! of this software for any purpose. It is provided "as is" without express or implied warranty. .LP THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, *************** *** 695,701 **** .br Supoj Sutanthavibul (supoj@sally.utexas.edu) .br ! University of Texas at Austin. .sp MetaFont driver by .br --- 718,724 ---- .br Supoj Sutanthavibul (supoj@sally.utexas.edu) .br ! University of Texas at Austin. .sp MetaFont driver by .br *************** *** 717,722 **** .br Mike Markowski (mm@udel.edu) with a little touch-up by Brian Smith .sp ! The CGM driver (Computer Graphics Metafile) was written by .br Philippe Bekaert (Philippe.Bekaert@cs.kuleuven.ac.be) --- 740,745 ---- .br Mike Markowski (mm@udel.edu) with a little touch-up by Brian Smith .sp ! The CGM driver (Computer Graphics Metafile) was written by .br Philippe Bekaert (Philippe.Bekaert@cs.kuleuven.ac.be) diff -rc transfig.3.2.3/doc/manual/README transfig.3.2.3b/doc/manual/README *** transfig.3.2.3/doc/manual/README Thu Apr 27 16:21:43 1995 --- transfig.3.2.3b/doc/manual/README Fri Jul 14 10:26:13 2000 *************** *** 1,6 **** ! PLEASE NOTE: This guide has not been updated to the current 3.1 file ! protocol. Please refer to the xfig document FORMAT3.1 for a complete ! description. This directory contains a manual which describes TransFig and how to use it. The manual includes TransFig figures, which have been translated into --- 1,4 ---- ! PLEASE NOTE: This guide is hopelessly out of date. This directory contains a manual which describes TransFig and how to use it. The manual includes TransFig figures, which have been translated into diff -rc transfig.3.2.3/doc/transfig.1 transfig.3.2.3b/doc/transfig.1 *** transfig.3.2.3/doc/transfig.1 Thu Jan 13 19:51:33 2000 --- transfig.3.2.3b/doc/transfig.1 Fri Jul 14 10:20:28 2000 *************** *** 1,4 **** ! .TH TRANSFIG 1 "Version 3.2.3 Jan 14, 2000" .SH NAME transfig \- creates a makefile for portable LaTeX figures .SH SYNOPSIS --- 1,4 ---- ! .TH TRANSFIG 1 "Version 3.2.3b July 19, 2000" .SH NAME transfig \- creates a makefile for portable LaTeX figures .SH SYNOPSIS diff -rc transfig.3.2.3/fig2dev/Imakefile transfig.3.2.3b/fig2dev/Imakefile *** transfig.3.2.3/fig2dev/Imakefile Fri Apr 7 10:29:10 2000 --- transfig.3.2.3b/fig2dev/Imakefile Tue Jul 11 15:23:44 2000 *************** *** 24,51 **** XCOMM copies from any such party to do so, with the only requirement being XCOMM that this copyright notice remain intact. XCOMM You should point XFIGLIBDIR to the same directory you did when you compiled XCOMM and installed xfig. This will be made automatic in the future. XFIGLIBDIR = /usr/local/lib/X11/xfig XCOMM If your system has the strerror() function (doesn't have sys_errlist) then XCOMM comment out NEED_STRERROR with an XCOMM comment. NEED_STRERROR = -DNEED_STRERROR ! XCOMM uncomment the following line if your compiler supports XCOMM inline functions. With the "INLINE" keyword, you should notice that XCOMM the display will be a bit faster in complex figures XCOMM USEINLINE = -DUSE_INLINE XCOMM Change RGB if necessary, to point to your rgb.txt color database XCOMM file (for X11). This is needed for the -g (background color) option. XCOMM ! RGB = $(LIBDIR)/rgb XCOMM Unomment the #define for USEXPM if you want to use the XPM XCOMM (color pixmap) package. XCOMM You need version 3.4c or newer of the XPM package. --- 24,64 ---- XCOMM copies from any such party to do so, with the only requirement being XCOMM that this copyright notice remain intact. + XCOMM ****** XCOMM You should point XFIGLIBDIR to the same directory you did when you compiled XCOMM and installed xfig. This will be made automatic in the future. XFIGLIBDIR = /usr/local/lib/X11/xfig + XCOMM ****** XCOMM If your system has the strerror() function (doesn't have sys_errlist) then XCOMM comment out NEED_STRERROR with an XCOMM comment. NEED_STRERROR = -DNEED_STRERROR ! XCOMM The following probably only applies to Windows 9x/NT: ! XCOMM If your system can open files in text and binary modes and has the ! XCOMM setmode() function, uncomment HAVE_SETMODE ! ! XCOMM HAVE_SETMODE = -DHAVE_SETMODE ! ! XCOMM **************** ! XCOMM Uncomment the following line if your compiler supports XCOMM inline functions. With the "INLINE" keyword, you should notice that XCOMM the display will be a bit faster in complex figures XCOMM USEINLINE = -DUSE_INLINE + XCOMM **************** XCOMM Change RGB if necessary, to point to your rgb.txt color database XCOMM file (for X11). This is needed for the -g (background color) option. + XCOMM Note that this changed slightly from the previous versions - you need + XCOMM the full name (rgb.txt) now. XCOMM ! RGB = $(LIBDIR)/rgb.txt + XCOMM **************** XCOMM Unomment the #define for USEXPM if you want to use the XPM XCOMM (color pixmap) package. XCOMM You need version 3.4c or newer of the XPM package. *************** *** 61,86 **** XPMINC = -I/usr/include/X11 #endif ! XCOMM For Linux machines or any machines that have a separate library for ! XCOMM the database management routines, uncomment the following line. ! XCOMM For the Redhat distributions of Linux you may have to change DBMLIB to -ldb. ! XCOMM For other Linux versions you may need -ldbm instead of -lgdbm. ! XCOMM Slackware and RedHat Linuxes use -lgdbm. ! ! XCOMM DBMLIB = -lgdbm ! ! XCOMM If your system doesn't have ndbm ("New" database manager) comment the following ! USE_NDBM = -DNDBM ! XCOMM If don't want to use JPEG, comment out the following line #define USEJPEG ! XCOMM If you don't have the jpeg library in your system library area, comment ! XCOMM out the USEINSTALLEDJPEG variable (using XCOMM), change the JPEGLIBDIR ! XCOMM variable to the directory where your jpeg library resides. Do not change ! XCOMM JPEGINCDIR in this case because it must be defined relative to the ! XCOMM fig2dev/dev subdirectory. XCOMM You must have version 5b or newer of the jpeg library. #define USEINSTALLEDJPEG --- 74,90 ---- XPMINC = -I/usr/include/X11 #endif ! XCOMM **************** XCOMM If don't want to use JPEG, comment out the following line #define USEJPEG ! XCOMM **************** ! XCOMM If you don't have the jpeg library in your system library area (meaning ! XCOMM that it must be compiled first), comment out the USEINSTALLEDJPEG variable ! XCOMM (using XCOMM), change the JPEGLIBDIR variable to the directory where your ! XCOMM jpeg library resides and change the JPEGINCDIR to the directory where your ! XCOMM jpeg header files (include) reside. XCOMM You must have version 5b or newer of the jpeg library. #define USEINSTALLEDJPEG *************** *** 95,109 **** #endif #endif /* USEJPEG */ ! XCOMM uncomment the following to set paper size to A4 XCOMM DDA4 = -DA4 ! XCOMM uncomment the following to set IBM Graphics Enhancement Cartridge XCOMM DDIBMGEC = -DIBMGEC ! XCOMM comment out the DDNFSS = ... line if you don't want NFSS2 font selection XCOMM for LaTeX texts ! XCOMM comment out the DDLATEX2E_GRAPHICS = ... line if you don't want to use the XCOMM standard graphics package distributed w/ LaTeX2e XCOMM UNcomment the DDEPSFIG = ... line if you want to use the deprecated epsfig macros XCOMM distributed w/ LaTeX2e (DDLATEX2E_GRAPHICS must also be defined) --- 99,116 ---- #endif #endif /* USEJPEG */ ! XCOMM **************** ! XCOMM Uncomment the following to set paper size to A4 XCOMM DDA4 = -DA4 ! XCOMM **************** ! XCOMM Uncomment the following to set IBM Graphics Enhancement Cartridge XCOMM DDIBMGEC = -DIBMGEC ! XCOMM **************** ! XCOMM Comment out the DDNFSS = ... line if you don't want NFSS2 font selection XCOMM for LaTeX texts ! XCOMM Comment out the DDLATEX2E_GRAPHICS = ... line if you don't want to use the XCOMM standard graphics package distributed w/ LaTeX2e XCOMM UNcomment the DDEPSFIG = ... line if you want to use the deprecated epsfig macros XCOMM distributed w/ LaTeX2e (DDLATEX2E_GRAPHICS must also be defined) *************** *** 116,130 **** DDLATEX2E_GRAPHICS = -DLATEX2E_GRAPHICS XCOMM DDEPSFIG = -DEPSFIG ! XCOMM comment out the DDDVIPS to NOT use dvips for the DVI-to-PostScript driver DDDVIPS = -DDVIPS XCOMM If your system doesn't have strcasecmp and/or strncasecmp ! XCOMM undefine the following two definitions XCOMM HAVE_NO_STRCASECMP = -DHAVE_NO_STRCASECMP XCOMM HAVE_NO_STRNCASECMP = -DHAVE_NO_STRNCASECMP XCOMM Uncomment the next line if you want use Japanese (i18n) on xfig. XCOMM #define I18N --- 123,144 ---- DDLATEX2E_GRAPHICS = -DLATEX2E_GRAPHICS XCOMM DDEPSFIG = -DEPSFIG ! XCOMM **************** ! XCOMM Comment out the DDDVIPS to NOT use dvips for the DVI-to-PostScript driver DDDVIPS = -DDVIPS + XCOMM **************** XCOMM If your system doesn't have strcasecmp and/or strncasecmp ! XCOMM uncomment the following two definitions XCOMM HAVE_NO_STRCASECMP = -DHAVE_NO_STRCASECMP XCOMM HAVE_NO_STRNCASECMP = -DHAVE_NO_STRNCASECMP + XCOMM **************** + XCOMM If your system doesn't have strstr() then uncomment the following line + XCOMM #define NOSTRSTR + + XCOMM **************** XCOMM Uncomment the next line if you want use Japanese (i18n) on xfig. XCOMM #define I18N *************** *** 132,149 **** #ifdef I18N I18N_DEFS = -DI18N FIG2DEV_LIBDIR = /usr/local/lib/fig2dev ! I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR='\"/usr/local/lib/fig2dev\"' install:: ! [ -d $(FIG2DEV_LIBDIR) ] || mkdir $(FIG2DEV_LIBDIR) ! $(INSTALL) -c dev/japanese.ps $(FIG2DEV_LIBDIR) ! ( cd $(FIG2DEV_LIBDIR); \ rm -f ja.ps ja_JP.ps ja_JP.ujis.ps ja_JP.eucJP.ps ja_JP.EUC.ps; \ ln -s japanese.ps ja.ps; ln -s japanese.ps ja_JP.ps; \ ln -s japanese.ps ja_JP.ujis.ps; ln -s japanese.ps ja_JP.eucJP.ps; \ ln -s japanese.ps ja_JP.EUC.ps ) ! $(INSTALL) -c dev/korean.ps $(FIG2DEV_LIBDIR) ! ( cd $(FIG2DEV_LIBDIR); \ rm -f ko.ps ko_KR.ps ko_KR.ujis.ps ko_KR.eucKR.ps ko_KR.EUC.ps; \ ln -s korean.ps ko.ps; ln -s korean.ps ko_KR.ps; \ ln -s korean.ps ko_KR.ujis.ps; ln -s korean.ps ko_KR.eucKR.ps; \ --- 146,163 ---- #ifdef I18N I18N_DEFS = -DI18N FIG2DEV_LIBDIR = /usr/local/lib/fig2dev ! I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR=\\\"$(DESTDIR)$(FIG2DEV_LIBDIR)\\\" install:: ! [ -d $(DESTDIR)$(FIG2DEV_LIBDIR) ] || mkdir $(DESTDIR)$(FIG2DEV_LIBDIR) ! $(INSTALL) -c dev/japanese.ps $(DESTDIR)$(FIG2DEV_LIBDIR) ! ( cd $(DESTDIR)$(FIG2DEV_LIBDIR); \ rm -f ja.ps ja_JP.ps ja_JP.ujis.ps ja_JP.eucJP.ps ja_JP.EUC.ps; \ ln -s japanese.ps ja.ps; ln -s japanese.ps ja_JP.ps; \ ln -s japanese.ps ja_JP.ujis.ps; ln -s japanese.ps ja_JP.eucJP.ps; \ ln -s japanese.ps ja_JP.EUC.ps ) ! $(INSTALL) -c dev/korean.ps $(DESTDIR)$(FIG2DEV_LIBDIR) ! ( cd $(DESTDIR)$(FIG2DEV_LIBDIR); \ rm -f ko.ps ko_KR.ps ko_KR.ujis.ps ko_KR.eucKR.ps ko_KR.EUC.ps; \ ln -s korean.ps ko.ps; ln -s korean.ps ko_KR.ps; \ ln -s korean.ps ko_KR.ujis.ps; ln -s korean.ps ko_KR.eucKR.ps; \ *************** *** 151,166 **** #endif DEFINES = $(NEED_STRERROR) $(HAVE_NO_STRCASECMP) $(HAVE_NO_STRNCASECMP) $(USEINLINE) \ ! $(I18N_DEFS) - XCOMM If your system doesn't have strstr() then uncomment the following line - XCOMM #define NOSTRSTR XCOMM ************************************************************** XCOMM *** You shouldn't have to change anything below this point *** XCOMM ************************************************************** ! DIR_DEFS= -DBITMAPDIR=\\\"$(XFIGLIBDIR)/bitmaps\\\" #ifdef USEXPM DUSEXPM = -DUSE_XPM --- 165,178 ---- #endif DEFINES = $(NEED_STRERROR) $(HAVE_NO_STRCASECMP) $(HAVE_NO_STRNCASECMP) $(USEINLINE) \ ! $(I18N_DEFS) $(HAVE_SETMODE) XCOMM ************************************************************** XCOMM *** You shouldn't have to change anything below this point *** XCOMM ************************************************************** ! DIR_DEFS= -DBITMAPDIR=\\\"$(DESTDIR)$(XFIGLIBDIR)/bitmaps\\\" #ifdef USEXPM DUSEXPM = -DUSE_XPM *************** *** 173,197 **** #endif #ifdef USEJPEG - DUSEJPEG = -DUSE_JPEG #ifdef USEINSTALLEDJPEG - JPEGLIBDIR = /usr/local/lib JPEGLIB = -L$(JPEGLIBDIR) -ljpeg #else - XCOMM this is relative to this directory (transfig/fig2dev) - JPEGLIBDIR = ../../jpeg-6a JPEGCONF = configure JPEGLIB = $(JPEGLIBDIR)/libjpeg.a DEPLIBJPEG = $(JPEGLIBDIR)/libjpeg.a ! #endif /* USEINSTALLEDJPEG */ #endif /* USEJPEG */ IMAKE_DEFINES = $(DUSEJPEG) $(DUSEXPM) ! DEVDEFINES = $(DUSEJPEG) $(DUSEXPM) $(XPMINC) $(DDNFSS) $(DDA4) \ $(DDLATEX2E_GRAPHICS) $(DDEPSFIG) $(DDIBMGEC) $(DDDVIPS) $(I18N_DEV_DEFS) #define IHaveSubdirs --- 185,206 ---- #endif #ifdef USEJPEG DUSEJPEG = -DUSE_JPEG + JPEGINC = -I$(JPEGINCDIR) #ifdef USEINSTALLEDJPEG JPEGLIB = -L$(JPEGLIBDIR) -ljpeg #else JPEGCONF = configure JPEGLIB = $(JPEGLIBDIR)/libjpeg.a DEPLIBJPEG = $(JPEGLIBDIR)/libjpeg.a ! #endif /* USEINSTALLEDJPEG */ #endif /* USEJPEG */ IMAKE_DEFINES = $(DUSEJPEG) $(DUSEXPM) ! DEVDEFINES = $(DUSEJPEG) $(DUSEXPM) $(XPMINC) $(JPEGINC) $(DDNFSS) $(DDA4) \ $(DDLATEX2E_GRAPHICS) $(DDEPSFIG) $(DDIBMGEC) $(DDDVIPS) $(I18N_DEV_DEFS) #define IHaveSubdirs *************** *** 207,215 **** LOCAL_LIBRARIES = $(LIBTRANSFIG) $(JPEGLIB) #if defined(NetBSDArchitecture) || defined(FreeBSDArchitecture) ! SYS_LIBRARIES = $(XPMLIBS) $(DBMLIB) -lm -lcompat #else ! SYS_LIBRARIES = $(XPMLIBS) $(DBMLIB) -lm #endif DEPLIBS = $(LIBTRANSFIG) --- 216,224 ---- LOCAL_LIBRARIES = $(LIBTRANSFIG) $(JPEGLIB) #if defined(NetBSDArchitecture) || defined(FreeBSDArchitecture) ! SYS_LIBRARIES = $(XPMLIBS) -lm -lcompat #else ! SYS_LIBRARIES = $(XPMLIBS) -lm #endif DEPLIBS = $(LIBTRANSFIG) *************** *** 225,234 **** fig2dev: $(DEPLIBJPEG) $(DEPLIBS) - RGBDBM = $(USE_NDBM) RGBFILE = -DRGB_FILE=\"$(RGB)\" ! SpecialObjectRule(colors.o, , $(RGBFILE) $(RGBDBM)) ! SpecialObjectRule(fig2dev.o, fig2dev.c ../patchlevel.h, ) XCOMM only compile our jpeg if the use doesn't have one installed --- 234,242 ---- fig2dev: $(DEPLIBJPEG) $(DEPLIBS) RGBFILE = -DRGB_FILE=\"$(RGB)\" ! SpecialObjectRule(colors.o, Imakefile , $(RGBFILE)) ! SpecialObjectRule(fig2dev.o, fig2dev.c drivers.h ../patchlevel.h, ) XCOMM only compile our jpeg if the use doesn't have one installed *************** *** 243,254 **** #endif $(LIBTRANSFIG):: ! cd $(DEVDIR); $(MAKE) JPEGINCDIR=$(JPEGINCDIR) \ ! DEFINES="$(DEVDEFINES) $(DIR_DEFS)" libtransfig.a - PROGRAM = fig2dev - AllTarget(fig2dev) - MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) ComplexProgramTarget(fig2dev) --- 251,258 ---- #endif $(LIBTRANSFIG):: ! cd $(DEVDIR); $(MAKE) DEFINES="$(DEVDEFINES) $(DIR_DEFS)" libtransfig.a DependSubdirs($(SUBDIRS)) ComplexProgramTarget(fig2dev) *************** *** 258,268 **** XCOMM Install the tk bitmaps here install:: @(cd bitmaps ; \ ! if [ -d $(XFIGLIBDIR)/bitmaps ]; then set +x; \ ! else (set -x; $(MKDIRHIER) $(XFIGLIBDIR)/bitmaps ); fi ; \ ! echo Copying bitmap files for tk to $(XFIGLIBDIR)/bitmaps ; \ for f in * ; do \ ! $(INSTALL) -c $$f $(XFIGLIBDIR)/bitmaps ; \ done) ; InstallScript(fig2ps2tex,$(BINDIR)) --- 262,272 ---- XCOMM Install the tk bitmaps here install:: @(cd bitmaps ; \ ! if [ -d $(DESTDIR)$(XFIGLIBDIR)/bitmaps ]; then set +x; \ ! else (set -x; $(MKDIRHIER) $(DESTDIR)$(XFIGLIBDIR)/bitmaps ); fi ; \ ! echo Copying bitmap files for tk to $(DESTDIR)$(XFIGLIBDIR)/bitmaps ; \ for f in * ; do \ ! $(INSTALL) -c $$f $(DESTDIR)$(XFIGLIBDIR)/bitmaps ; \ done) ; InstallScript(fig2ps2tex,$(BINDIR)) *************** *** 273,283 **** --- 277,290 ---- InstallManPage(pic2tpic,$(MANDIR)) fig2dev.man:: ../doc/fig2dev.1 + $(RM) fig2dev.man -ln -s ../doc/fig2dev.1 fig2dev.man fig2ps2tex.man:: ../doc/fig2ps2tex.1 + $(RM) fig2ps2tex.man -ln -s ../doc/fig2ps2tex.1 fig2ps2tex.man pic2tpic.man:: ../doc/pic2tpic.1 + $(RM) pic2tpic.man -ln -s ../doc/pic2tpic.1 pic2tpic.man diff -rc transfig.3.2.3/fig2dev/bound.c transfig.3.2.3b/fig2dev/bound.c *** transfig.3.2.3/fig2dev/bound.c Thu Dec 9 10:53:03 1999 --- transfig.3.2.3b/fig2dev/bound.c Mon May 1 14:16:39 2000 *************** *** 26,31 **** --- 26,32 ---- */ #include "fig2dev.h" + #include "figure.h" #include "object.h" #define Ninety_deg M_PI_2 *************** *** 36,41 **** --- 37,104 ---- #define max(a, b) (((a) > (b)) ? (a) : (b)) #define min(a, b) (((a) < (b)) ? (a) : (b)) + static double compute_angle(); + + /************** ARRAY FOR ARROW SHAPES **************/ + + struct _fpnt { + double x,y; + }; + + struct _arrow_shape { + int numpts; + int tipno; + double tipmv; + struct _fpnt points[6]; + }; + + #define NUM_ARROW_TYPES 21 + static struct _arrow_shape arrow_shapes[NUM_ARROW_TYPES+1] = { + /* number of points, index of tip, {datapairs} */ + /* first point must be upper-left point of tail, then tip */ + + /* type 0 */ + { 3, 1, 2.15, {{-1,0.5}, {0,0}, {-1,-0.5}}}, + /* place holder for what would be type 0 filled */ + { 0 }, + /* type 1 simple triangle */ + { 4, 1, 2.1, {{-1.0,0.5}, {0,0}, {-1.0,-0.5}, {-1.0,0.5}}}, + /* type 1 filled simple triangle*/ + { 4, 1, 2.1, {{-1.0,0.5}, {0,0}, {-1.0,-0.5}, {-1.0,0.5}}}, + /* type 2 concave spearhead */ + { 5, 1, 2.6, {{-1.25,0.5},{0,0},{-1.25,-0.5},{-1.0,0},{-1.25,0.5}}}, + /* type 2 filled concave spearhead */ + { 5, 1, 2.6, {{-1.25,0.5},{0,0},{-1.25,-0.5},{-1.0,0},{-1.25,0.5}}}, + /* type 3 convex spearhead */ + { 5, 1, 1.5, {{-0.75,0.5},{0,0},{-0.75,-0.5},{-1.0,0},{-0.75,0.5}}}, + /* type 3 filled convex spearhead */ + { 5, 1, 1.5, {{-0.75,0.5},{0,0},{-0.75,-0.5},{-1.0,0},{-0.75,0.5}}}, + /* type 4 diamond */ + { 5, 1, 1.15, {{-0.5,0.5},{0,0},{-0.5,-0.5},{-1.0,0},{-0.5,0.5}}}, + /* type 4 filled diamond */ + { 5, 1, 1.15, {{-0.5,0.5},{0,0},{-0.5,-0.5},{-1.0,0},{-0.5,0.5}}}, + /* type 5 circle - handled in code */ + { 0, 0, 0.0 }, { 0, 0, 0.0 }, + /* type 6 half circle - handled in code */ + { 0, 0, -1.0 }, { 0, 0, -1.0 }, + /* type 7 square */ + { 5, 1, 0.0, {{-1.0,0.5},{0,0.5},{0,-0.5},{-1.0,-0.5},{-1.0,0.5}}}, + /* type 7 filled square */ + { 5, 1, 0.0, {{-1.0,0.5},{0,0.5},{0,-0.5},{-1.0,-0.5},{-1.0,0.5}}}, + /* type 8 reverse triangle */ + { 4, 1, 0.0, {{-1.0,0},{0,0.5},{0,-0.5},{-1.0,0}}}, + /* type 8 filled reverse triangle */ + { 4, 1, 0.0, {{-1.0,0},{0,0.5},{0,-0.5},{-1.0,0}}}, + /* type 9a "wye" */ + { 3, 0, -1.0, {{0,0.5},{-1.0,0},{0,-0.5}}}, + /* type 9b bar */ + { 2, 1, 0.0, {{0,0.5},{0,-0.5}}}, + /* type 10a two-prong fork */ + { 4, 0, -1.0, {{0,0.5},{-1.0,0.5},{-1.0,-0.5},{0,-0.5}}}, + /* type 10b backward two-prong fork */ + { 4, 1, 0.0, {{-1.0,0.5,},{0,0.5},{0,-0.5},{-1.0,-0.5}}}, + }; + arc_bound(arc, xmin, ymin, xmax, ymax) F_arc *arc; int *xmin, *ymin, *xmax, *ymax; *************** *** 122,143 **** *ymin = sy; *xmax = bx; *ymax = by; } compound_bound(compound, xmin, ymin, xmax, ymax, include) ! F_compound *compound; ! int *xmin, *ymin, *xmax, *ymax; ! int include; ! { ! F_arc *a; ! F_ellipse *e; ! F_compound *c; ! F_spline *s; ! F_line *l; ! F_text *t; ! int bx, by, sx, sy, first = 1; ! int llx, lly, urx, ury; ! int half_wd; llx = lly = 1000000; urx = ury = -1000000; --- 185,209 ---- *ymin = sy; *xmax = bx; *ymax = by; + + /* now add in the arrow (if any) boundaries */ + arrow_bound(O_ARC, (F_line *)arc, xmin, ymin, xmax, ymax); } compound_bound(compound, xmin, ymin, xmax, ymax, include) ! F_compound *compound; ! int *xmin, *ymin, *xmax, *ymax; ! int include; ! { ! F_arc *a; ! F_ellipse *e; ! F_compound *c; ! F_spline *s; ! F_line *l; ! F_text *t; ! int bx, by, sx, sy, first = 1; ! int llx, lly, urx, ury; ! int half_wd; llx = lly = 1000000; urx = ury = -1000000; *************** *** 315,321 **** int *xmin, *ymin, *xmax, *ymax; { points_bound(l->points, xmin, ymin, xmax, ymax); ! } spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; --- 381,391 ---- int *xmin, *ymin, *xmax, *ymax; { points_bound(l->points, xmin, ymin, xmax, ymax); ! /* now add in the arrow (if any) boundaries but ! only if the line has two or more points */ ! if (l->points->next) ! arrow_bound(O_POLYLINE, l, xmin, ymin, xmax, ymax); ! } spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; *************** *** 327,333 **** else { normal_spline_bound(s, xmin, ymin, xmax, ymax); } ! } int_spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; --- 397,405 ---- else { normal_spline_bound(s, xmin, ymin, xmax, ymax); } ! /* now do any arrows */ ! arrow_bound(O_SPLINE, s, xmin, ymin, xmax, ymax); ! } int_spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; *************** *** 373,379 **** *ymin = round(sy); *xmax = round(bx); *ymax = round(by); ! } normal_spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; --- 445,451 ---- *ymin = round(sy); *xmax = round(bx); *ymax = round(by); ! } normal_spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; *************** *** 422,469 **** *xmax = ceil (max(bx, x2) ); *ymax = ceil (max(by, y2) ); } ! } double rot_x(x,y,angle) ! double x,y,angle; { return(x*cos(-angle)-y*sin(-angle)); } double rot_y(x,y,angle) ! double x,y,angle; { ! return(x*sin(-angle)+y*cos(-angle)); } ! text_bound(t, xmin, ymin, xmax, ymax, include) ! F_text *t; ! int *xmin, *ymin, *xmax, *ymax; ! int include; { ! double dx1, dx2, dx3, dx4, dy1, dy2, dy3, dy4; ! int descend; ! descend = (strchr(t->cstring,'g') || strchr(t->cstring,'j') || strchr(t->cstring,'p') || strchr(t->cstring,'q') || strchr(t->cstring,'y')); ! /* characters have some extent downside */ ! if (t->type == T_CENTER_JUSTIFIED) { ! dx1 = (include? (t->length/1.95) : 0.0); dy1 = 0.0; ! dx2 = (include? -(t->length/1.95) : 0.0); dy2 = 0.0; ! dx3 = (include? (t->length/1.95) : 0.0); dy3 = -t->height; ! dx4 = (include? -(t->length/1.95) : 0.0); dy4 = -t->height; ! } else if (t->type == T_RIGHT_JUSTIFIED) { ! dx1 = 0.0; dy1 = 0.0; ! dx2 = (include? -t->length*1.0256 : 0.0); dy2 = 0.0; ! dx3 = 0.0; dy3 = -t->height; ! dx4 = (include? -t->length*1.0256 : 0.0); dy4 = -t->height; ! } else { ! dx1 = (include ? t->length*1.0256 : 0.0); dy1 = 0.0; ! dx2 = 0.0; dy2 = 0.0; ! dx3 = (include ? t->length*1.0256 : 0.0); dy3 = -t->height; ! dx4 = 0.0; dy4 = -t->height; ! } if (descend) { dy1 = 0.3*t->height; dy2 = 0.3*t->height; --- 494,543 ---- *xmax = ceil (max(bx, x2) ); *ymax = ceil (max(by, y2) ); } ! } double rot_x(x,y,angle) ! double x,y,angle; { return(x*cos(-angle)-y*sin(-angle)); } double rot_y(x,y,angle) ! double x,y,angle; { ! return(x*sin(-angle)+y*cos(-angle)); } ! text_bound(t, xmin, ymin, xmax, ymax, inc_text) ! F_text *t; ! int *xmin, *ymin, *xmax, *ymax; ! int inc_text; { ! double dx1, dx2, dx3, dx4, dy1, dy2, dy3, dy4; ! int descend; ! ! Boolean include = (inc_text && ((t->flags & SPECIAL_TEXT)==0)); ! descend = (strchr(t->cstring,'g') || strchr(t->cstring,'j') || strchr(t->cstring,'p') || strchr(t->cstring,'q') || strchr(t->cstring,'y')); ! /* characters have some extent downside */ ! if (t->type == T_CENTER_JUSTIFIED) { ! dx1 = (include? (t->length/1.95) : 0.0); dy1 = 0.0; ! dx2 = (include? -(t->length/1.95) : 0.0); dy2 = 0.0; ! dx3 = (include? (t->length/1.95) : 0.0); dy3 = -t->height; ! dx4 = (include? -(t->length/1.95) : 0.0); dy4 = -t->height; ! } else if (t->type == T_RIGHT_JUSTIFIED) { ! dx1 = 0.0; dy1 = 0.0; ! dx2 = (include? -t->length*1.0256 : 0.0); dy2 = 0.0; ! dx3 = 0.0; dy3 = -t->height; ! dx4 = (include? -t->length*1.0256 : 0.0); dy4 = -t->height; ! } else { ! dx1 = (include ? t->length*1.0256 : 0.0); dy1 = 0.0; ! dx2 = 0.0; dy2 = 0.0; ! dx3 = (include ? t->length*1.0256 : 0.0); dy3 = -t->height; ! dx4 = 0.0; dy4 = -t->height; ! } if (descend) { dy1 = 0.3*t->height; dy2 = 0.3*t->height; *************** *** 484,494 **** *ymin= t->base_y + min( min( rot_y(dx1,dy1,t->angle), rot_y(dx2,dy2,t->angle) ), min( rot_y(dx3,dy3,t->angle), rot_y(dx4,dy4,t->angle) ) ); ! } points_bound(points, xmin, ymin, xmax, ymax) ! F_point *points; ! int *xmin, *ymin, *xmax, *ymax; { int bx, by, sx, sy; F_point *p; --- 558,568 ---- *ymin= t->base_y + min( min( rot_y(dx1,dy1,t->angle), rot_y(dx2,dy2,t->angle) ), min( rot_y(dx3,dy3,t->angle), rot_y(dx4,dy4,t->angle) ) ); ! } points_bound(points, xmin, ymin, xmax, ymax) ! F_point *points; ! int *xmin, *ymin, *xmax, *ymax; { int bx, by, sx, sy; F_point *p; *************** *** 500,510 **** } *xmin = sx; *ymin = sy; *xmax = bx; *ymax = by; ! } control_points_bound(cps, xmin, ymin, xmax, ymax) ! F_control *cps; ! int *xmin, *ymin, *xmax, *ymax; { F_control *c; double bx, by, sx, sy; --- 574,584 ---- } *xmin = sx; *ymin = sy; *xmax = bx; *ymax = by; ! } control_points_bound(cps, xmin, ymin, xmax, ymax) ! F_control *cps; ! int *xmin, *ymin, *xmax, *ymax; { F_control *c; double bx, by, sx, sy; *************** *** 521,524 **** } *xmin = round(sx); *ymin = round(sy); *xmax = round(bx); *ymax = round(by); ! } --- 595,954 ---- } *xmin = round(sx); *ymin = round(sy); *xmax = round(bx); *ymax = round(by); ! } ! ! /* extend xmin, ymin xmax, ymax by the arrow boundaries of obj (if any) */ ! ! arrow_bound(objtype, obj, xmin, ymin, xmax, ymax) ! int objtype; ! F_line *obj; ! int *xmin, *ymin, *xmax, *ymax; ! { ! int fxmin, fymin, fxmax, fymax; ! int bxmin, bymin, bxmax, bymax; ! F_point *p, *q; ! F_arc *a; ! int p1x, p1y, p2x, p2y; ! int dum; ! int npts, i; ! Point arrowpts[50]; ! ! if (obj->for_arrow) { ! if (objtype == O_ARC) { ! a = (F_arc *) obj; ! compute_arcarrow_angle(a->center.x, a->center.y, ! (double)a->point[2].x, (double)a->point[2].y, ! a->direction, a->for_arrow, &p1x, &p1y); ! p2x = a->point[2].x; /* forward tip */ ! p2y = a->point[2].y; ! } else { ! /* this doesn't work very well for a spline with few points ! and lots of curvature */ ! /* locate last point (forward tip) and next-to-last point */ ! for (p = obj->points; p->next; p = p->next) ! q = p; ! p1x = q->x; ! p1y = q->y; ! p2x = p->x; ! p2y = p->y; ! } ! calc_arrow(p1x, p1y, p2x, p2y, &dum, &dum, &dum, &dum, ! obj->for_arrow, arrowpts, &npts, &dum); ! fxmin=fymin=100000; ! fxmax=fymax=-100000; ! for (i=0; iback_arrow) { ! if (objtype == O_ARC) { ! a = (F_arc *) obj; ! compute_arcarrow_angle(a->center.x, a->center.y, ! (double) a->point[0].x, (double) a->point[0].y, ! a->direction ^ 1, a->back_arrow, &p1x, &p1y); ! p2x = a->point[0].x; /* backward tip */ ! p2y = a->point[0].y; ! } else { ! p1x = obj->points->next->x; /* second point */ ! p1y = obj->points->next->y; ! p2x = obj->points->x; /* first point (forward tip) */ ! p2y = obj->points->y; ! } ! calc_arrow(p1x, p1y, p2x, p2y, &dum, &dum, &dum, &dum, ! obj->back_arrow, arrowpts, &npts, &dum); ! bxmin=bymin=100000; ! bxmax=bymax=-100000; ! for (i=0; iwid; ! float ht = arrow->ht; ! int type, style, indx; ! int i, np; ! ! /* types = 0...10 */ ! type = arrow->type; ! /* style = 0 (unfilled) or 1 (filled) */ ! style = arrow->style; ! /* index into shape array */ ! indx = 2*type + style; ! ! *npoints = 0; ! *nboundpts = 0; ! dx = x2 - x1; ! dy = y1 - y2; ! if (dx==0 && dy==0) ! return; ! ! /* lpt is the amount the arrowhead extends beyond the end of the ! line because of the sharp point (miter join) */ ! ! tipmv = arrow_shapes[indx].tipmv; ! lpt = 0.0; ! /* lines are made a little thinner in set_linewidth */ ! thick = (arrow->thickness <= THICK_SCALE) ? ! 0.5* arrow->thickness : ! arrow->thickness - THICK_SCALE; ! if (tipmv > 0.0) ! lpt = thick / (2.0 * sin(atan(wd / (tipmv * ht)))); ! else if (tipmv == 0.0) ! lpt = thick / 3.0; /* types which have blunt end */ ! /* (Don't adjust those with tipmv < 0) */ ! ! /* alpha is the angle the line is relative to horizontal */ ! alpha = atan2(dy,-dx); ! ! /* ddx, ddy is amount to move end of line back so that arrowhead point ! ends where line used to */ ! ddx = lpt * cos(alpha); ! ddy = lpt * sin(alpha); ! ! /* move endpoint of line back */ ! mx = x2 + ddx; ! my = y2 + ddy; ! ! l = sqrt(dx * dx + dy * dy); ! sina = dy / l; ! cosa = dx / l; ! xb = mx * cosa - my * sina; ! yb = mx * sina + my * cosa; ! ! /* (xa,ya) is the rotated endpoint */ ! xa = xb * cosa + yb * sina + 0.5; ! ya = -xb * sina + yb * cosa + 0.5; ! ! /* ! * We approximate circles with an octagon since, at small sizes, ! * this is sufficient. I haven't bothered to alter the bounding ! * box calculations. ! */ ! miny = 100000.0; ! maxy = -100000.0; ! if (type == 5 || type == 6) { /* also include half circle */ ! double rmag; ! double angle, init_angle, rads; ! double fix_x, fix_y; ! ! /* get angle of line */ ! init_angle = compute_angle(dx,dy); ! ! /* (xs,ys) is a point the length (height) of the arrowhead BACK from ! the end of the shaft */ ! /* for the half circle, use 0.0 */ ! xs = (xb-(type==5? ht: 0.0)) * cosa + yb * sina + 0.5; ! ys = -(xb-(type==5? ht: 0.0)) * sina + yb * cosa + 0.5; ! ! /* calc new (dx, dy) from moved endpoint to (xs, ys) */ ! dx = mx - xs; ! dy = my - ys; ! /* radius */ ! rmag = ht/2.0; ! fix_x = xs + (dx / (double) 2.0); ! fix_y = ys + (dy / (double) 2.0); ! /* choose number of points for circle - 20+mag/4 points */ ! np = round(mag/4.0) + 20; ! /* full or half circle? */ ! rads = (type==5? M_2PI: M_PI); ! ! if (type == 5) { ! init_angle = 5.0*M_PI_2 - init_angle; ! /* np/2 points in the forward part of the circle for the line clip area */ ! *nboundpts = np/2; ! /* full circle */ ! rads = M_2PI; ! } else { ! init_angle = 3.0*M_PI_2 - init_angle; ! /* no points in the line clip area */ ! *nboundpts = 0; ! /* half circle */ ! rads = M_PI; ! } ! /* draw the half or full circle */ ! for (i = 0; i < np; i++) { ! if (type == 5) ! angle = init_angle - (rads * (double) i / (double) np); ! else ! angle = init_angle - (rads * (double) i / (double) (np-1)); ! x = fix_x + round(rmag * cos(angle)); ! points[*npoints].x = x; ! y = fix_y + round(rmag * sin(angle)); ! points[*npoints].y = y; ! miny = min2(y, miny); ! maxy = max2(y, maxy); ! (*npoints)++; ! } ! x = 2.0*THICK_SCALE; ! y = rmag; ! xt = x*cosa + y*sina + x2; ! yt = -x*sina + y*cosa + y2; ! *c1x = xt; ! *c1y = yt; ! y = -rmag; ! xt = x*cosa + y*sina + x2; ! yt = -x*sina + y*cosa + y2; ! *c2x = xt; ! *c2y = yt; ! } else { ! /* 3 points in the arrowhead that define the line clip part */ ! *nboundpts = 3; ! np = arrow_shapes[indx].numpts; ! for (i=0; i 0) ! alpha = M_PI_2; ! else ! alpha = 3 * M_PI_2; ! } else if (dy == 0) { ! if (dx > 0) ! alpha = 0; ! else ! alpha = M_PI; ! } else { ! alpha = atan(dy / dx); /* range = -PI/2 to PI/2 */ ! if (dx < 0) ! alpha += M_PI; ! else if (dy < 0) ! alpha += M_2PI; ! } ! return (alpha); ! } ! ! /* Computes a point on a line which is a chord to the arc specified by */ ! /* center (x1,y1) and endpoint (x2,y2), where the chord intersects the */ ! /* arc arrow->ht from the endpoint. */ ! /* May give strange values if the arrow.ht is larger than about 1/4 of */ ! /* the circumference of a circle on which the arc lies. */ ! ! compute_arcarrow_angle(x1, y1, x2, y2, direction, arrow, x, y) ! double x1, y1; ! double x2, y2; ! int direction; ! F_arrow *arrow; ! int *x, *y; ! { ! double r, alpha, beta, dy, dx; ! double lpt,h; ! double thick; ! ! dy=y2-y1; ! dx=x2-x1; ! r=sqrt(dx*dx+dy*dy); ! h = (double) arrow->ht; ! /* lines are made a little thinner in set_linewidth */ ! thick = (arrow->thickness <= THICK_SCALE) ? ! 0.5* arrow->thickness : ! arrow->thickness - THICK_SCALE; ! /* lpt is the amount the arrowhead extends beyond the end of the line */ ! lpt = thick/2.0/(arrow->wid/h/2.0); ! /* add this to the length */ ! h += lpt; ! ! /* radius too small for this method, use normal method */ ! if (h > 2.0*r) { ! arc_tangent(x1,y1,x2,y2,direction,x,y); ! return; ! } ! ! beta=atan2(dy,dx); ! if (direction) { ! alpha = 2*asin(h/2.0/r); ! } else { ! alpha = -2*asin(h/2.0/r); ! } ! ! *x=round(x1+r*cos(beta+alpha)); ! *y=round(y1+r*sin(beta+alpha)); ! } ! diff -rc transfig.3.2.3/fig2dev/colors.c transfig.3.2.3b/fig2dev/colors.c *** transfig.3.2.3/fig2dev/colors.c Wed Nov 24 14:29:25 1999 --- transfig.3.2.3b/fig2dev/colors.c Tue May 30 11:30:59 2000 *************** *** 17,64 **** #include "fig2dev.h" ! #ifdef NDBM ! #include ! #else ! #ifdef SVR4 ! #include ! #else ! #include ! #endif ! #endif ! ! #ifdef NDBM ! DBM *rgb_dbm = (DBM *)NULL; ! #else ! int rgb_dbm = 0; ! #endif - - /* initialize the X11 RGB color database file */ - - init_colordb() - { - - #ifdef NDBM - rgb_dbm = dbm_open(RGB_FILE, 0, 0); - #else - if (dbminit(RGB_FILE) == 0) - rgb_dbm = 1; - #endif - return 0; - } - int ! lookup_db_color(name, rgb) char *name; RGB *rgb; { ! datum dbent; ! int j, n; ! int r,g,b; ! char rgb_txt[PATH_MAX]; ! char s[100], s1[100]; ! FILE *fp; if (name[0] == '#') { /* hex color parse it now */ if (strlen(name) == 4) { /* #rgb */ --- 17,49 ---- #include "fig2dev.h" ! struct color_db { ! char *name; ! int red, green, blue; ! }; ! ! struct color_db *Xcolors; ! int numXcolors, maxcolors; ! Boolean have_read_X_colors = False; int ! lookup_X_color(name, rgb) char *name; RGB *rgb; { ! int i, n; ! int r, g, b; ! struct color_db *col; ! ! /* read the X color database file if we haven't done that yet */ ! if (!have_read_X_colors) { ! if (read_colordb() != 0) { ! /* error reading color database, return black */ ! rgb->red = rgb->green = rgb->blue = 0; ! return -1; ! } ! have_read_X_colors = True; ! } if (name[0] == '#') { /* hex color parse it now */ if (strlen(name) == 4) { /* #rgb */ *************** *** 82,135 **** rgb->green = g; rgb->blue = b; } ! if (n != 3) { ! rgb->red=rgb->green=rgb->blue=0; ! return -1; } } else { ! /* make colorname all lower case */ ! for (j=strlen(name); j>=0; j--) { ! if (isupper(name[j])) ! name[j]=tolower(name[j]); ! } ! if (rgb_dbm) { ! dbent.dptr = name; ! dbent.dsize = strlen(name); ! /* look it up to get the rgb values */ ! #ifdef NDBM ! dbent = dbm_fetch(rgb_dbm, dbent); ! #else ! dbent = fetch (dbent); ! #endif ! if(dbent.dptr) { ! memcpy((char *) rgb, dbent.dptr, sizeof (RGB)); ! } else { ! rgb->red=rgb->green=rgb->blue=0; ! return -1; } ! } else { /* no DBM file; try to read rgb.txt */ ! sprintf(rgb_txt, "%s.txt", RGB_FILE); ! fp = fopen(rgb_txt, "r"); ! if (fp == NULL) { ! fprintf(stderr,"Couldn't open the RGB database file '%s'\n", rgb_txt); return -1; ! } else { ! while (fgets(s, sizeof(s), fp)) { ! if (sscanf(s, "%d %d %d %s", &r, &g, &b, s1) == 4) { ! if (strcasecmp(name, s1) == 0) { ! rgb->red = r << 8; ! rgb->green = g << 8; ! rgb->blue = b << 8; ! fclose(fp); ! return 0; ! } } - } - fclose(fp); - rgb->red=rgb->green=rgb->blue=0; - return -1; } } } return 0; } --- 67,141 ---- rgb->green = g; rgb->blue = b; } ! if (n == 3) { ! /* ok */ ! return 0; } } else { ! /* named color, look in the database we read in */ ! for (col = Xcolors, i=0; iname, name) == 0) { ! /* found it */ ! rgb->red = col->red; ! rgb->green = col->green; ! rgb->blue = col->blue; ! return 0; } ! } ! } ! /* not found or bad #rgb spec, set to black */ ! rgb->red = rgb->green = rgb->blue = 0; ! return -1; ! } ! ! /* read the X11 RGB color database (ASCII .txt) file */ ! ! read_colordb() ! { ! FILE *fp; ! char s[100], s1[100], *c1, *c2; ! int r,g,b; ! struct color_db *col; ! ! fp = fopen(RGB_FILE, "r"); ! if (fp == NULL) { ! fprintf(stderr,"Couldn't open the RGB database file '%s'\n", RGB_FILE); ! return -1; ! } ! numXcolors = 0; ! maxcolors = 400; ! if ((Xcolors = (struct color_db*) malloc(maxcolors*sizeof(struct color_db))) == NULL) { ! fprintf(stderr,"Couldn't allocate space for the RGB database file\n"); ! return -1; ! } ! ! while (fgets(s, sizeof(s), fp)) { ! if (numXcolors >= maxcolors) { ! maxcolors += 500; ! if ((Xcolors = (struct color_db*) realloc(Xcolors, maxcolors*sizeof(struct color_db))) == NULL) { ! fprintf(stderr,"Couldn't allocate space for the RGB database file\n"); return -1; ! } ! } ! if (sscanf(s, "%d %d %d %[^\n]", &r, &g, &b, s1) == 4) { ! /* remove any white space from the color name */ ! for (c1=s1, c2=s1; *c2; c2++) { ! if (*c2 != ' ' && *c2 != '\t') { ! *c1 = *c2; ! c1++; } } + *c1 = '\0'; + col = (Xcolors+numXcolors); + col->red = r << 8; + col->green = g << 8; + col->blue = b << 8; + col->name = malloc(strlen(s1)+1); + strcpy(col->name, s1); + numXcolors++; } } + fclose(fp); return 0; } + diff -rc transfig.3.2.3/fig2dev/dev/Imakefile transfig.3.2.3b/fig2dev/dev/Imakefile *** transfig.3.2.3/fig2dev/dev/Imakefile Wed Jan 5 10:30:09 2000 --- transfig.3.2.3b/fig2dev/dev/Imakefile Tue Jul 11 14:47:31 2000 *************** *** 22,32 **** XCOMM the party supplying this software to the X Consortium. INCLUDES = -I.. -I../.. - #ifdef JPEGINCDIR - JPEGINC = -I$(JPEGINCDIR) - #endif - - EXTRA_INCLUDES = $(JPEGINC) #ifdef USE_XPM READXPMS=readxpm.c --- 22,27 ---- diff -rc transfig.3.2.3/fig2dev/dev/genbitmaps.c transfig.3.2.3b/fig2dev/dev/genbitmaps.c *** transfig.3.2.3/fig2dev/dev/genbitmaps.c Mon Jan 3 09:50:47 2000 --- transfig.3.2.3b/fig2dev/dev/genbitmaps.c Tue Jul 11 15:16:14 2000 *************** *** 35,66 **** #include "object.h" #include "texfonts.h" ! extern void ! genps_arc(), ! genps_ellipse(), ! genps_line(), ! genps_spline(), ! genps_text(); ! ! static char gscom[1000],*gsdev,tmpname[PATH_MAX]; ! Boolean direct; ! FILE *saveofile; ! char *ofile; ! int width,height; ! int jpeg_quality=75; ! static int border_margin = 0; ! static int smooth = 1; ! static int debug = 0; void - gs_broken_pipe(int sig) - { - fprintf(stderr,"fig2dev: broken pipe (GhostScript aborted?)\n"); - fprintf(stderr,"command was: %s\n", gscom); - exit(1); - } - - void genbitmaps_option(opt, optarg) char opt; char *optarg; --- 35,50 ---- #include "object.h" #include "texfonts.h" ! static char *gsdev,tmpname[PATH_MAX]; ! static Boolean direct; ! static FILE *saveofile; ! static char *ofile; ! static int width,height; ! static int jpeg_quality=75; ! static int border_margin = 0; ! static int smooth = 0; void genbitmaps_option(opt, optarg) char opt; char *optarg; *************** *** 72,78 **** break; case 'g': /* background color (handled in postscript gen) */ ! if (lookup_db_color(optarg,&background) >= 0) { bgspec = True; } else { fprintf(stderr,"Can't parse color '%s', ignoring background option\n", --- 56,62 ---- break; case 'g': /* background color (handled in postscript gen) */ ! if (lookup_X_color(optarg,&background) >= 0) { bgspec = True; } else { fprintf(stderr,"Can't parse color '%s', ignoring background option\n", *************** *** 95,102 **** case 'S': /* smoothing factor */ sscanf(optarg,"%d",&smooth); ! if (smooth < 1) { ! fprintf(stderr,"fig2dev: bad value for -S option: %s\n", optarg); exit(1); } break; --- 79,88 ---- case 'S': /* smoothing factor */ sscanf(optarg,"%d",&smooth); ! if (smooth != 0 && smooth != 1 && smooth != 2 && smooth != 4) { ! fprintf(stderr, ! "fig2dev: bad value for -S option: %s, should be 0, 2 or 4\n", ! optarg); exit(1); } break; *************** *** 128,152 **** ury += bd; /* make command for ghostscript */ ! width=round(mag*smooth*(urx-llx)/THICK_SCALE); ! height=round(mag*smooth*(ury-lly)/THICK_SCALE); /* Add conditionals here if gs has a driver built-in */ /* gs has a driver for png, ppm, pcx, jpeg and tiff */ direct = True; ! ofile = to; extra_options[0]='\0'; gsdev = NULL; /* if we're smoothing, we'll generate magnified ppm then convert it later */ ! if (smooth == 1) { ! if (strcmp(lang,"png")==0) { ! gsdev="png16m"; ! } else if (strcmp(lang,"pcx")==0) { gsdev="pcx256"; } else if (strcmp(lang,"ppm")==0) { gsdev="ppmraw"; } else if (strcmp(lang,"tiff")==0) { /* use the 24-bit - unfortunately, it doesn't use compression */ gsdev="tiff24nc"; --- 114,138 ---- ury += bd; /* make command for ghostscript */ ! ! width=round(mag*(urx-llx)/THICK_SCALE); ! height=round(mag*(ury-lly)/THICK_SCALE); /* Add conditionals here if gs has a driver built-in */ /* gs has a driver for png, ppm, pcx, jpeg and tiff */ direct = True; ! ofile = (to == NULL? "-": to); extra_options[0]='\0'; gsdev = NULL; /* if we're smoothing, we'll generate magnified ppm then convert it later */ ! if (strcmp(lang,"pcx")==0) { gsdev="pcx256"; } else if (strcmp(lang,"ppm")==0) { gsdev="ppmraw"; + } else if (strcmp(lang,"png")==0) { + gsdev="png16m"; } else if (strcmp(lang,"tiff")==0) { /* use the 24-bit - unfortunately, it doesn't use compression */ gsdev="tiff24nc"; *************** *** 153,172 **** } else if (strcmp(lang,"jpeg")==0) { gsdev="jpeg"; /* set quality for JPEG */ ! sprintf(extra_options,"-dJPEGQ=%d",jpeg_quality); } } /* no driver in gs or we're smoothing, use ppm output then use ppmtoxxx later */ if (gsdev == NULL) { gsdev="ppmraw"; ! /* make a unique name for the temporary ppm file */ ! sprintf(tmpname,"%s/f2d%d.ppm",TMPDIR,getpid()); ! ofile = tmpname; ! direct = False; } /* make up the command for gs */ ! sprintf(gscom, "gs -q -dSAFER -sDEVICE=%s -r%d -g%dx%d -sOutputFile=%s %s -", ! gsdev, 80 * smooth, width, height, ofile, extra_options); /* divert output from ps driver to the pipe into ghostscript */ /* but first close the output file that main() opened */ saveofile = tfp; --- 139,163 ---- } else if (strcmp(lang,"jpeg")==0) { gsdev="jpeg"; /* set quality for JPEG */ ! sprintf(extra_options," -dJPEGQ=%d",jpeg_quality); } + if (smooth > 1) { + sprintf(extra_options+strlen(extra_options), + " -dTextAlphaBits=%d -dGraphicsAlphaBits=%d",smooth,smooth); } /* no driver in gs or we're smoothing, use ppm output then use ppmtoxxx later */ if (gsdev == NULL) { gsdev="ppmraw"; ! if (smooth > 1 || strcmp(lang,"ppm")) { ! /* make a unique name for the temporary ppm file */ ! sprintf(tmpname,"%s/f2d%d.ppm",TMPDIR,getpid()); ! ofile = tmpname; ! direct = False; ! } } /* make up the command for gs */ ! sprintf(gscom, "gs -q -dSAFER -sDEVICE=%s -r%d -g%dx%d -sOutputFile=%s%s -", ! gsdev, 80, width, height, ofile, extra_options); /* divert output from ps driver to the pipe into ghostscript */ /* but first close the output file that main() opened */ saveofile = tfp; *************** *** 213,224 **** /* and pipe through the ppm converter for that format */ if (!direct) { tmpname1 = tmpname; ! if (smooth == 1) { ! strcpy(com, "("); ! } else { ! sprintf(com, "(pnmscale %f %s | ", 1.0 / smooth, tmpname); ! tmpname1 = ""; ! } if (strcmp(lang, "gif")==0) { if (gif_transparent[0]) { /* escape the first char of the transparent color (#) for the shell */ --- 204,210 ---- /* and pipe through the ppm converter for that format */ if (!direct) { tmpname1 = tmpname; ! strcpy(com, "("); if (strcmp(lang, "gif")==0) { if (gif_transparent[0]) { /* escape the first char of the transparent color (#) for the shell */ *************** *** 228,234 **** sprintf(com1,"ppmquant 256 %s | ppmtogif",tmpname1); } } else if (strcmp(lang, "jpeg")==0) { ! sprintf(com1, "cjpeg -quality %d %s", jpeg_quality, tmpname1); } else if (strcmp(lang, "xbm")==0) { sprintf(com1,"ppmtopgm %s | pgmtopbm | pbmtoxbm",tmpname1); } else if (strcmp(lang, "xpm")==0) { --- 214,221 ---- sprintf(com1,"ppmquant 256 %s | ppmtogif",tmpname1); } } else if (strcmp(lang, "jpeg")==0) { ! /*sprintf(com1, "cjpeg -quality %d %s", jpeg_quality, tmpname1);*/ ! sprintf(com1, "ppmtojpeg --quality=%d %s", jpeg_quality, tmpname1); } else if (strcmp(lang, "xbm")==0) { sprintf(com1,"ppmtopgm %s | pgmtopbm | pbmtoxbm",tmpname1); } else if (strcmp(lang, "xpm")==0) { *************** *** 237,246 **** sprintf(com1,"ppmtoacad %s",tmpname1); } else if (strcmp(lang, "pcx")==0) { sprintf(com1, "ppmtopcx %s", tmpname1); } else if (strcmp(lang, "png")==0) { sprintf(com1, "pnmtopng %s", tmpname1); - } else if (strcmp(lang, "ppm")==0) { - sprintf(com1, "cat %s", tmpname1); } else if (strcmp(lang, "tiff")==0) { sprintf(com1, "pnmtotiff %s", tmpname1); } else { --- 224,233 ---- sprintf(com1,"ppmtoacad %s",tmpname1); } else if (strcmp(lang, "pcx")==0) { sprintf(com1, "ppmtopcx %s", tmpname1); + } else if (strcmp(lang, "ppm")==0) { + com1[0] = '\0'; /* nothing to do for ppm */ } else if (strcmp(lang, "png")==0) { sprintf(com1, "pnmtopng %s", tmpname1); } else if (strcmp(lang, "tiff")==0) { sprintf(com1, "pnmtotiff %s", tmpname1); } else { *************** *** 261,268 **** /* make a unique name for an error file */ sprintf(errfname,"%s/f2d%d.err",TMPDIR,getpid()); - if (debug) - fprintf(stderr,"Calling: %s\n",com); /* send all messages to error file */ strcat(com," 2> "); strcat(com,errfname); --- 248,253 ---- *************** *** 282,288 **** fprintf(stderr,"Command used:\n %s\n",com); fprintf(stderr,"Messages resulting:\n"); if (errfile == 0) ! fprintf(stderr,"can't opern error file %s\n",errfname); else { while (!feof(errfile)) { if (fgets(com, sizeof(com)-1, errfile) == NULL) --- 267,273 ---- fprintf(stderr,"Command used:\n %s\n",com); fprintf(stderr,"Messages resulting:\n"); if (errfile == 0) ! fprintf(stderr,"can't open error file %s\n",errfname); else { while (!feof(errfile)) { if (fgets(com, sizeof(com)-1, errfile) == NULL) diff -rc transfig.3.2.3/fig2dev/dev/genbox.c transfig.3.2.3b/fig2dev/dev/genbox.c *** transfig.3.2.3/fig2dev/dev/genbox.c Wed Nov 24 14:30:43 1999 --- transfig.3.2.3b/fig2dev/dev/genbox.c Tue Jul 11 14:49:51 2000 *************** *** 42,54 **** void genbox_start(objects) F_compound *objects; { - double ppi; - - if (0 == (ppi = (double)objects->nwcorner.x)) { - fprintf(stderr, "Resolution is zero!! default to 80 ppi\n"); - ppi = 80.0; - } - /* draw box */ fprintf(tfp, "\\makebox[%.3fin]{\\rule{0in}{%.3fin}}\n", (urx-llx)*mag/ppi, (ury-lly)*mag/ppi); --- 42,47 ---- diff -rc transfig.3.2.3/fig2dev/dev/gencgm.c transfig.3.2.3b/fig2dev/dev/gencgm.c *** transfig.3.2.3/fig2dev/dev/gencgm.c Wed Dec 22 13:02:54 1999 --- transfig.3.2.3b/fig2dev/dev/gencgm.c Tue Jul 11 14:50:22 2000 *************** *** 74,80 **** * see fillshade() and conv_color(). */ #define EPSILON 1e-4 /* small floating point value */ - static int Ypointsdown; /* True for Y axis pointing downward */ static int rounded_arrows; /* If rounded_arrows is False, the position * of arrows will be corrected for * compensating line width effects. This --- 74,79 ---- *************** *** 82,89 **** * rounded with the used CGM viewer. * See -r driver command line option. */ - static float scale; /* scale factor for fonts */ - static struct _rgb { float r, g, b; } --- 81,86 ---- *************** *** 137,144 **** int i; char *p, *figname = malloc(strlen(from)+1); - scale = (double) objects->nwcorner.x; - sprintf(figname, from); p = strrchr(figname, '/'); if (p) --- 134,139 ---- *************** *** 147,154 **** if (p) *p = '\0'; /* discard extension */ - Ypointsdown = (objects->nwcorner.y == 2); - fprintf(tfp, "BEGMF '%s';\n", figname); fprintf(tfp, "mfversion 1;\n"); fprintf(tfp, "mfdesc 'Converted from %s using fig2dev -Lcgm';\n", from); --- 142,147 ---- *************** *** 266,275 **** int x; int y; { - if (Ypointsdown) fprintf(tfp, "(%d,%d)", x-llx, ury-y); - else - fprintf(tfp, "(%d,%d)", x-llx, y-lly); } /* only reverses y if Y axis points down (relative position) */ --- 259,265 ---- *************** *** 278,287 **** int x; int y; { - if (Ypointsdown) fprintf(tfp, "(%d,%d)", x, -y); - else - fprintf(tfp, "(%d,%d)", x, y); } static void --- 268,274 ---- *************** *** 962,977 **** fprintf(tfp, "arcctr "); _pos(cx, cy); fprintf(tfp, " "); ! if (Ypointsdown) { ! /* reverse direction */ ! _relpos(x2, y2); ! fprintf(tfp, " "); ! _relpos(x1, y1); ! } else { ! _relpos(x1, y1); ! fprintf(tfp, " "); ! _relpos(x2, y2); ! } fprintf(tfp, " %d;\n", r); } --- 949,957 ---- fprintf(tfp, "arcctr "); _pos(cx, cy); fprintf(tfp, " "); ! _relpos(x2, y2); ! fprintf(tfp, " "); ! _relpos(x1, y1); fprintf(tfp, " %d;\n", r); } *************** *** 1211,1217 **** x2 = a->point[2].x - a->point[1].x, y2 = a->point[2].y - a->point[1].y; ! return Ypointsdown ? (icprod(x1,y1,x2,y2) > 0) : (icprod(x1,y1,x2,y2) < 0); } /* reverses arc direction by swapping endpoints and arrows */ --- 1191,1197 ---- x2 = a->point[2].x - a->point[1].x, y2 = a->point[2].y - a->point[1].y; ! return (icprod(x1,y1,x2,y2) > 0); } /* reverses arc direction by swapping endpoints and arrows */ *************** *** 1480,1486 **** { static double oldsize = UNDEFVALUE; chkcache(size, oldsize); ! fprintf(tfp, "charheight %d;\n", round(/*scale*/ 10 * size /*/ 80.*/)); } static void --- 1460,1466 ---- { static double oldsize = UNDEFVALUE; chkcache(size, oldsize); ! fprintf(tfp, "charheight %d;\n", round( 10 * size )); } static void *************** *** 1501,1507 **** { fprintf(tfp, "text "); _pos(x, y); ! fprintf(tfp, " final '%s';\n", text); } void --- 1481,1495 ---- { fprintf(tfp, "text "); _pos(x, y); ! fprintf(tfp, " final '"); ! /* if text contains a "'", must escape it(them) */ ! while ( *text ) { ! fputc(*text,tfp); ! if ( *text == '\'' ) ! fputc('\'',tfp); ! text++; ! } ! fprintf(tfp,"';\n"); } void diff -rc transfig.3.2.3/fig2dev/dev/genepic.c transfig.3.2.3b/fig2dev/dev/genepic.c *** transfig.3.2.3/fig2dev/dev/genepic.c Sun Jan 2 12:33:48 2000 --- transfig.3.2.3b/fig2dev/dev/genepic.c Tue Jul 11 14:50:28 2000 *************** *** 124,134 **** typedef struct fp_struct FPoint; /* Local to the file only */ - static int coord_system; - static int CoordSys = 2; static double Threshold; static Boolean linew_spec; - static int DPI; static int CurWidth = 0; static int LineStyle = SOLID_LINE; static int LLX = 0, LLY = 0; --- 124,131 ---- *************** *** 221,227 **** break; case 'a': ! fprintf(stderr, "warning: genepic option -a obsolete"); break; case 'f': --- 218,224 ---- break; case 'a': ! fprintf(stderr, "warning: genepic option -a obsolete\n"); break; case 'f': *************** *** 228,247 **** for ( i = 1; i <= MAX_FONT; i++ ) if ( !strcmp(optarg, texfontnames[i]) ) break; ! if ( i > MAX_FONT) ! { ! fprintf(stderr, ! "warning: non-standard font name %s ignored\n", optarg); ! } ! else ! { ! texfontnames[0] = texfontnames[i]; #ifdef NFSS ! texfontfamily[0] = texfontfamily[i]; ! texfontseries[0] = texfontseries[i]; ! texfontshape[0] = texfontshape[i]; #endif ! } break; case 'l': --- 225,240 ---- for ( i = 1; i <= MAX_FONT; i++ ) if ( !strcmp(optarg, texfontnames[i]) ) break; ! if ( i > MAX_FONT) { ! fprintf(stderr, "warning: non-standard font name %s ignored\n", optarg); ! } else { ! texfontnames[0] = texfontnames[i]; #ifdef NFSS ! texfontfamily[0] = texfontfamily[i]; ! texfontseries[0] = texfontseries[i]; ! texfontshape[0] = texfontshape[i]; #endif ! } break; case 'l': *************** *** 301,309 **** fconvertCS(fpt) FPoint *fpt; { ! if (CoordSys) { ! fpt->y = TopCoord - fpt->y; ! } fpt->x -= LLX; fpt->y -= LLY; } --- 294,300 ---- fconvertCS(fpt) FPoint *fpt; { ! fpt->y = TopCoord - fpt->y; fpt->x -= LLX; fpt->y -= LLY; } *************** *** 311,319 **** convertCS(pt) F_point *pt; { ! if (CoordSys) { ! pt->y = TopCoord - pt->y; ! } pt->x -= LLX; pt->y -= LLY; } --- 302,308 ---- convertCS(pt) F_point *pt; { ! pt->y = TopCoord - pt->y; pt->x -= LLX; pt->y -= LLY; } *************** *** 358,386 **** fputs(Preamble, stdout); } - DPI = objects->nwcorner.x; - if (DPI <= 0) { - put_msg("Resolution has to be positive. Default to 80!\n"); - DPI = 80; - } - /* now that we have DPI defined we can use the -l option */ if (linew_spec) ! LineThick = LineThick * DPI/80; if (LineThick == 0) ! LineThick = 2*DPI/80; ! DashScale = (double)DPI/80.0; ! coord_system = objects->nwcorner.y; ! switch (coord_system) { ! case 1: ! CoordSys = 0; ! break; ! case 2: ! CoordSys = 1; ! break; ! default: ! put_msg("Unknown Coordinate system -- %d\n", coord_system); ! exit(1); ! } pt1.x = llx; pt1.y = lly; pt2.x = urx; --- 347,357 ---- fputs(Preamble, stdout); } if (linew_spec) ! LineThick = LineThick * ppi/80.0; if (LineThick == 0) ! LineThick = 2.0*ppi/80.0; ! DashScale = ppi/80.0; pt1.x = llx; pt1.y = lly; pt2.x = urx; *************** *** 402,408 **** if (Verbose) { fprintf(tfp, "%%\n%% Language in use is %s\n%%\n", Tlangkw[TeXLang]); } ! Threshold = 1.0 / DPI * mag; fprintf(tfp, "\\setlength{\\unitlength}{%.8fin}\n", Threshold); MaxCircleRadius = (int) (40 / 72.27 / Threshold); Threshold = SegLen / Threshold; --- 373,379 ---- if (Verbose) { fprintf(tfp, "%%\n%% Language in use is %s\n%%\n", Tlangkw[TeXLang]); } ! Threshold = 1.0 / ppi * mag; fprintf(tfp, "\\setlength{\\unitlength}{%.8fin}\n", Threshold); MaxCircleRadius = (int) (40 / 72.27 / Threshold); Threshold = SegLen / Threshold; *************** *** 440,446 **** if (CurWidth==ThinLines) { fprintf(tfp, "\\thinlines\n"); } else if (VarWidth) { ! fprintf(tfp, "\\allinethickness{%4.3fpt}%%\n",w*80.0/DPI); } else { fprintf(tfp, "\\thicklines\n"); } --- 411,417 ---- if (CurWidth==ThinLines) { fprintf(tfp, "\\thinlines\n"); } else if (VarWidth) { ! fprintf(tfp, "\\allinethickness{%4.3fpt}%%\n",w*80.0/ppi); } else { fprintf(tfp, "\\thicklines\n"); } *************** *** 823,829 **** fprintf(tfp, "\\dottedline{%d}", DotDist); break; default: ! fprintf(stderr,"Unknown Style\n"); exit(1); } fprintf(tfp, "(%d,%d)", p->x, p->y); --- 794,800 ---- fprintf(tfp, "\\dottedline{%d}", DotDist); break; default: ! fprintf(stderr,"Only solid, dashed, and dotted line styles supported by epic(eepic)\n"); exit(1); } fprintf(tfp, "(%d,%d)", p->x, p->y); *************** *** 1374,1380 **** set_linewidth(arc->thickness); if (TeXLang == EEpic) { set_pattern(arc->fill_style, arc->fill_color); ! fprintf(tfp, "\\put(%4.3lf,%4.3lf){", ctr.x, ctr.y); } else { fprintf(tfp, "\\drawline"); } --- 1345,1351 ---- set_linewidth(arc->thickness); if (TeXLang == EEpic) { set_pattern(arc->fill_style, arc->fill_color); ! fprintf(tfp, "\\put(%4.3f,%4.3f){", ctr.x, ctr.y); } else { fprintf(tfp, "\\drawline"); } *************** *** 1396,1402 **** #ifdef DrawOutLine if (OutLine==1) { OutLine=0; ! fprintf(tfp, "\\put(%4.3lf,%4.3lf){", ctr.x, ctr.y); fprintf(tfp, "\\arc{%4.3f}{%2.4f}{%2.4f}}\n", 2*r1, th2, th2+theta); } #endif --- 1367,1373 ---- #ifdef DrawOutLine if (OutLine==1) { OutLine=0; ! fprintf(tfp, "\\put(%4.3f,%4.3f){", ctr.x, ctr.y); fprintf(tfp, "\\arc{%4.3f}{%2.4f}{%2.4f}}\n", 2*r1, th2, th2+theta); } #endif *************** *** 1412,1418 **** #ifdef DrawOutLine if (OutLine==1) { OutLine=0; ! fprintf(tfp, "\\put(%4.3lf,%4.3lf){", ctr.x, ctr.y); fprintf(tfp, "\\arc{%4.3f}{%2.4f}{%2.4f}}\n", 2*r2, th1, th1+theta); } #endif --- 1383,1389 ---- #ifdef DrawOutLine if (OutLine==1) { OutLine=0; ! fprintf(tfp, "\\put(%4.3f,%4.3f){", ctr.x, ctr.y); fprintf(tfp, "\\arc{%4.3f}{%2.4f}{%2.4f}}\n", 2*r2, th1, th1+theta); } #endif *************** *** 1463,1469 **** fprintf(tfp, "\n\t"); pt_count = 1; } ! fprintf(tfp, "(%.3lf,%.3lf)", ctr->x + cos(th1) * r, ctr->y + sin(th1) * r); th1 += delta; } --- 1434,1440 ---- fprintf(tfp, "\n\t"); pt_count = 1; } ! fprintf(tfp, "(%.3f,%.3f)", ctr->x + cos(th1) * r, ctr->y + sin(th1) * r); th1 += delta; } diff -rc transfig.3.2.3/fig2dev/dev/genge.c transfig.3.2.3b/fig2dev/dev/genge.c *** transfig.3.2.3/fig2dev/dev/genge.c Wed Dec 22 13:03:25 1999 --- transfig.3.2.3b/fig2dev/dev/genge.c Tue Jul 11 14:50:31 2000 *************** *** 30,37 **** #define SCALE(v) (round((v)*scale)) #define min(a, b) (((a) < (b)) ? (a) : (b)) - static int coord_system; - static int resolution; static float scale; static set_color(); --- 30,35 ---- *************** *** 101,110 **** int itmp; int clipx, clipy; - resolution = objects->nwcorner.x; - coord_system = objects->nwcorner.y; /* convert dpi to 0.1mm per point */ ! scale = 254.0 / resolution; /* print any whole-figure comments prefixed with "#" */ print_comments("# ",objects->comments, ""); --- 99,106 ---- int itmp; int clipx, clipy; /* convert dpi to 0.1mm per point */ ! scale = 254.0 / ppi; /* print any whole-figure comments prefixed with "#" */ print_comments("# ",objects->comments, ""); diff -rc transfig.3.2.3/fig2dev/dev/genibmgl.c transfig.3.2.3b/fig2dev/dev/genibmgl.c *** transfig.3.2.3/fig2dev/dev/genibmgl.c Wed Dec 22 13:02:31 1999 --- transfig.3.2.3b/fig2dev/dev/genibmgl.c Tue Jul 11 14:50:34 2000 *************** *** 211,222 **** } } - static double ppi; /* pixels/inch */ static double cpi; /* cent/inch */ static double cpp; /* cent/pixel */ static double wcmpp = CMPP; /* centimeter/point */ static double hcmpp = CMPP; /* centimeter/point */ - static int flipped = False; /* flip Y coordinate */ void genibmgl_start(objects) F_compound *objects; --- 211,220 ---- *************** *** 272,279 **** ppi = objects->nwcorner.x; cpi = mag*100.0/sqrt((xu-xl)*(xu-xl) + (yu-yl)*(yu-yl)); cpp = cpi/ppi; - if (objects->nwcorner.y == 2) - flipped = True; /* IBMGL start */ fprintf(tfp, "IN;\n"); /* initialize plotter */ --- 270,275 ---- *************** *** 290,305 **** P2x = Xur; if (reflected) /* upside-down text */ hcmpp = -hcmpp; ! if (reflected^flipped) { /* reflected or flipped */ ! P1y = Yur; /* but not both */ ! P2y = Yll; ! } ! else { /* normal */ P1y = Yll; P2y = Yur; ! } } ! else { /* landscape mode */ Xll = xl*UNITS_PER_INCH; Yll = yl*UNITS_PER_INCH; Yur = yu*UNITS_PER_INCH; --- 286,299 ---- P2x = Xur; if (reflected) /* upside-down text */ hcmpp = -hcmpp; ! if (reflected) { /* reflected */ P1y = Yll; P2y = Yur; ! } else { ! P1y = Yur; ! P2y = Yll; } ! } else { /* landscape mode */ Xll = xl*UNITS_PER_INCH; Yll = yl*UNITS_PER_INCH; Yur = yu*UNITS_PER_INCH; *************** *** 310,329 **** wcmpp = -wcmpp; /* backward text */ P1x = Xur; P2x = Xll; ! } ! else { /* normal */ P1x = Xll; P2x = Xur; - } - if (flipped) { /* reflected or not */ - P1y = Yur; - P2y = Yll; - } - else { - P1y = Yll; - P2y = Yur; - } } Xmin = xz; Ymin = yz; --- 304,316 ---- wcmpp = -wcmpp; /* backward text */ P1x = Xur; P2x = Xll; ! } else { /* normal */ P1x = Xll; P2x = Xur; } + P1y = Yur; + P2y = Yll; + } Xmin = xz; Ymin = yz; *************** *** 558,574 **** dy2 = ey - cy; theta = atan2(dy2, dx2) - atan2(dy1, dx1); ! if (a->direction^flipped) { ! if (theta < 0.0) ! theta += 2.0*M_PI; ! } ! else { if (theta > 0.0) theta -= 2.0*M_PI; ! } if (a->type == T_OPEN_ARC && a->thickness != 0 && a->back_arrow) { ! arc_tangent(cx, cy, sx, sy, a->direction^flipped, &x, &y); draw_arrow_head(x, y, sx, sy, a->back_arrow->ht/ppi, a->back_arrow->wid/ppi); } --- 545,560 ---- dy2 = ey - cy; theta = atan2(dy2, dx2) - atan2(dy1, dx1); ! if (a->direction) { if (theta > 0.0) theta -= 2.0*M_PI; ! } else { ! if (theta < 0.0) ! theta += 2.0*M_PI; ! } if (a->type == T_OPEN_ARC && a->thickness != 0 && a->back_arrow) { ! arc_tangent(cx, cy, sx, sy, !a->direction, &x, &y); draw_arrow_head(x, y, sx, sy, a->back_arrow->ht/ppi, a->back_arrow->wid/ppi); } *************** *** 581,587 **** fprintf(tfp, "EP;\n"); if (a->type == T_OPEN_ARC && a->thickness != 0 && a->for_arrow) { ! arc_tangent(cx, cy, ex, ey, !a->direction^flipped, &x, &y); draw_arrow_head(x, y, ex, ey, a->for_arrow->ht/ppi, a->for_arrow->wid/ppi); } --- 567,573 ---- fprintf(tfp, "EP;\n"); if (a->type == T_OPEN_ARC && a->thickness != 0 && a->for_arrow) { ! arc_tangent(cx, cy, ex, ey, a->direction, &x, &y); draw_arrow_head(x, y, ex, ey, a->for_arrow->ht/ppi, a->for_arrow->wid/ppi); } *************** *** 612,619 **** b = e->radiuses.y/ppi; x0 = e->center.x/ppi; y0 = e->center.y/ppi; ! angle = (flipped ? -e->angle: e->angle); ! delta = (flipped ? -DELTA: DELTA); x = x0 + cos(angle)*a; y = y0 + sin(angle)*a; --- 598,605 ---- b = e->radiuses.y/ppi; x0 = e->center.x/ppi; y0 = e->center.y/ppi; ! angle = -e->angle; ! delta = -DELTA; x = x0 + cos(angle)*a; y = y0 + sin(angle)*a; *************** *** 714,731 **** x0 = llx/ppi; x1 = urx/ppi; dx = l->radius/ppi; ! if (flipped) { ! y0 = ury/ppi; ! y1 = lly/ppi; ! dy = -dx; ! angle = -M_PI/2.0; ! } ! else { ! y0 = lly/ppi; ! y1 = ury/ppi; ! dy = dx; ! angle = M_PI/2.0; ! } fprintf(tfp, "PA%.4f,%.4f;PM;PD;\n", x0, y0 + dy); arc(x0, y0 + dy, x0 + dx, y0 + dy, angle, DELTA); --- 700,709 ---- x0 = llx/ppi; x1 = urx/ppi; dx = l->radius/ppi; ! y0 = ury/ppi; ! y1 = lly/ppi; ! dy = -dx; ! angle = -M_PI/2.0; fprintf(tfp, "PA%.4f,%.4f;PM;PD;\n", x0, y0 + dy); arc(x0, y0 + dy, x0 + dx, y0 + dy, angle, DELTA); diff -rc transfig.3.2.3/fig2dev/dev/genlatex.c transfig.3.2.3b/fig2dev/dev/genlatex.c *** transfig.3.2.3/fig2dev/dev/genlatex.c Wed Nov 24 14:31:00 1999 --- transfig.3.2.3b/fig2dev/dev/genlatex.c Tue Jul 11 14:50:39 2000 *************** *** 110,116 **** char thin_ldot [] = THIN_LDOT; char thick_ldot[] = THICK_LDOT; - static int coord_system; static int verbose = 0; double dash_mag = 1.0; int thick_width = 2; --- 110,115 ---- *************** *** 226,248 **** texfontsizes[0] = texfontsizes[1] = TEXFONTSIZE(font_size?font_size:DEFAULT_FONT_SIZE); - coord_system = objects->nwcorner.y; unitlength = mag/objects->nwcorner.x; dash_mag /= unitlength*80.0; ! switch (coord_system) { ! case 1: ! translate_coordinates = translate1; ! translate_coordinates_d = translate1_d; ! break; ! case 2: ! translate_coordinates = translate2; ! translate_coordinates_d = translate2_d; ! break; ! default: ! fprintf(stderr, "Wrong coordinate system; cannot continue\n"); ! return; ! } TRANS2(llx, lly, urx, ury); if (llx > urx) SWAP(llx, urx) --- 225,235 ---- texfontsizes[0] = texfontsizes[1] = TEXFONTSIZE(font_size?font_size:DEFAULT_FONT_SIZE); unitlength = mag/objects->nwcorner.x; dash_mag /= unitlength*80.0; ! translate_coordinates = translate2; ! translate_coordinates_d = translate2_d; TRANS2(llx, lly, urx, ury); if (llx > urx) SWAP(llx, urx) *************** *** 331,336 **** --- 318,324 ---- TRANS(x, y); fprintf(tfp, "\\put(%3d,%3d){\\makebox(%.4f,%.4f){%s}}\n", x, y, dot_xoffset, dot_yoffset, dot_cmd); + reset_color(l->pen_color); return; } *************** *** 353,358 **** --- 341,347 ---- put_arc_box (llx, lly, urx, ury, l->radius, l->style, l->style_val); else put_box (llx, lly, urx, ury, l->style, l->style_val); + reset_color(l->pen_color); return; } *************** *** 583,589 **** } if (2*dl >= l || (sx && sy && (l/cosine)*unitlength < MIN_LEN)) { fprintf(stderr, "Dashed line too short; drawing solid line\n"); ! put_solidline (x, y, sx, sy, l, arrow, 0); return; } dg = (l - (n/2+1)*dl) / (double)(n/2); --- 572,578 ---- } if (2*dl >= l || (sx && sy && (l/cosine)*unitlength < MIN_LEN)) { fprintf(stderr, "Dashed line too short; drawing solid line\n"); ! put_solidline (x, y, sx, sy, l, arrow, (double) 0.0); return; } dg = (l - (n/2+1)*dl) / (double)(n/2); *************** *** 683,688 **** --- 672,679 ---- /* print any comments prefixed with "%" */ print_comments("% ",e->comments, ""); + set_color(e->pen_color); + set_linewidth(e->thickness); switch (e->style) { case SOLID_LINE: *************** *** 717,722 **** --- 708,715 ---- if (e->fill_style != UNFILLED) fprintf(stderr, "Ellipse area fill not implemented\n"); } + reset_color(e->pen_color); + } void *************** *** 980,1033 **** #define MAXCOLORS 32 set_color(col) int col; { static char *colors[] = { ! "0 0 0", /* black */ ! "0 0 1", /* blue */ ! "0 1 0", /* green */ ! "0 1 1", /* cyan */ ! "1 0 0", /* red */ ! "1 0 1", /* magenta */ ! "1 1 0", /* yellow */ ! "1 1 1", /* white */ ! "1 .84 0", /* gold */ ! "0 0 .56", /* dk blue */ ! "0 0 .69", /* md blue */ ! "0 0 .82", /* lt blue */ ! "0 .56 0", /* dk green */ ! "0 .69 0", /* md green */ ! "0 .82 0", /* lt green */ ! "0 .56 .56", /* dk cyan */ ! "0 .69 .69", /* md cyan */ ! "0 .82 .82", /* lt cyan */ ! ".56 0 0", /* dk red */ ! ".69 0 0", /* md red */ ! ".82 0 0", /* lt red */ ! ".56 0 .56", /* dk magenta */ ! ".69 0 .69", /* md magenta */ ! ".82 0 .82", /* lt magenta */ ! ".5 .17 0", /* dk brown */ ! ".63 .25 0", /* md brown1 */ ! ".75 .38 0", /* md brown1 */ ! ".88 .44 0", /* lt brown */ ! "1 .5 .5", /* dk pink */ ! "1 .63 .63", /* md pink1 */ ! "1 .75 .75", /* md pink2 */ ! "1 .88 .88", /* lt pink */ }; #ifdef DVIPS if (col != -1) { if (col < NUM_STD_COLS) ! fprintf(tfp, "\\special{ps: gsave %s setrgbcolor}", ! colors[col]); else ! fprintf(tfp, "\\special{ps: gsave %.3f %.3f %.3f setrgbcolor}", user_colors[col-NUM_STD_COLS].r/256.0, user_colors[col-NUM_STD_COLS].g/256.0, user_colors[col-NUM_STD_COLS].b/256.0); } #endif return; --- 973,1034 ---- #define MAXCOLORS 32 + /* need this for communication between color routines. Sorry */ + static int lastcolor=-1; + set_color(col) int col; { static char *colors[] = { ! "0,0,0", /* black */ ! "0,0,1", /* blue */ ! "0,1,0", /* green */ ! "0,1,1", /* cyan */ ! "1,0,0", /* red */ ! "1,0,1", /* magenta */ ! "1,1,0", /* yellow */ ! "1,1,1", /* white */ ! "1,.84,0", /* gold */ ! "0,0,.56", /* dk blue */ ! "0,0,.69", /* md blue */ ! "0,0,.82", /* lt blue */ ! "0,.56,0", /* dk green */ ! "0,.69,0", /* md green */ ! "0,.82,0", /* lt green */ ! "0,.56,.56", /* dk cyan */ ! "0,.69,.69", /* md cyan */ ! "0,.82,.82", /* lt cyan */ ! ".56,0,0", /* dk red */ ! ".69,0,0", /* md red */ ! ".82,0,0", /* lt red */ ! ".56,0,.56", /* dk magenta */ ! ".69,0,.69", /* md magenta */ ! ".82,0,.82", /* lt magenta */ ! ".5,.17,0", /* dk brown */ ! ".63,.25,0", /* md brown1 */ ! ".75,.38,0", /* md brown1 */ ! ".88,.44,0", /* lt brown */ ! "1,.5,.5", /* dk pink */ ! "1,.63,.63", /* md pink1 */ ! "1,.75,.75", /* md pink2 */ ! "1,.88,.88", /* lt pink */ }; + #ifdef DVIPS if (col != -1) { + /* we do not support nested colors, although LaTeX would */ + if (lastcolor == -1) + fprintf(tfp, "{"); + /* switch to (other) color */ if (col < NUM_STD_COLS) ! fprintf(tfp, "\\color[rgb]{%s}",colors[col]); else ! fprintf(tfp, "\\color[rgb]{%.3f,%.3f,%.3f}", user_colors[col-NUM_STD_COLS].r/256.0, user_colors[col-NUM_STD_COLS].g/256.0, user_colors[col-NUM_STD_COLS].b/256.0); + lastcolor = col; } #endif return; *************** *** 1037,1044 **** int col; { #ifdef DVIPS ! if (col != -1 && col < NUM_STD_COLS + MAX_USR_COLS) ! fprintf(tfp, "\\special{ps: grestore}"); #endif return; } --- 1038,1049 ---- int col; { #ifdef DVIPS ! if (col != -1 && col < NUM_STD_COLS + MAX_USR_COLS) { ! /* end using the last color */ ! fprintf(tfp, "}%%\n"); ! } ! /* make sure the color indicator is reset */ ! lastcolor = -1; #endif return; } diff -rc transfig.3.2.3/fig2dev/dev/genmap.c transfig.3.2.3b/fig2dev/dev/genmap.c *** transfig.3.2.3/fig2dev/dev/genmap.c Tue Dec 21 09:51:18 1999 --- transfig.3.2.3b/fig2dev/dev/genmap.c Tue Jul 11 14:50:43 2000 *************** *** 380,387 **** } } ! struct ! driver dev_map = { genmap_option, genmap_start, genmap_arc, --- 380,386 ---- } } ! struct driver dev_map = { genmap_option, genmap_start, genmap_arc, diff -rc transfig.3.2.3/fig2dev/dev/genmf.c transfig.3.2.3b/fig2dev/dev/genmf.c *** transfig.3.2.3/fig2dev/dev/genmf.c Wed Nov 24 14:31:04 1999 --- transfig.3.2.3b/fig2dev/dev/genmf.c Tue Jul 11 14:50:46 2000 *************** *** 51,57 **** double *value; } Options; - static double ppi; static double code = 32.0; static int oldpen = 0; static double penscale = 1; --- 51,56 ---- *************** *** 68,74 **** int thickness; { if (thickness != oldpen) { ! fprintf(tfp, "penwd := %.2lfpt;\n", thickness/THICK_SCALE*penscale*yscale*mag); fprintf(tfp, "drawpen := pencircle scaled penwd yscaled aspect_ratio;\n"); oldpen = thickness; --- 67,73 ---- int thickness; { if (thickness != oldpen) { ! fprintf(tfp, "penwd := %.2fpt;\n", thickness/THICK_SCALE*penscale*yscale*mag); fprintf(tfp, "drawpen := pencircle scaled penwd yscaled aspect_ratio;\n"); oldpen = thickness; *************** *** 84,90 **** if (maxy == INFTY) maxy = yu; - ppi = objects->nwcorner.x; curchar = (int)code; fprintf(tfp,"%%\n%% fig2dev -L mf (Version %s Patchlevel %s)\n", --- 83,88 ---- *************** *** 104,111 **** fprintf(tfp,"%%\n%% %s (char %d)\n%%\n", (name? name: ((from) ? from : "stdin")), ++curchar); ! fprintf(tfp,"xscale:=%.3lf; yscale:=%.3lf;\n", xscale*mag, yscale*mag); ! fprintf(tfp,"bounds(%.3lf,%.3lf,%.3lf,%.3lf);\n", xl, xu, yl, yu); fprintf(tfp,"unitlen:=1.0in#;\n"); fprintf(tfp,"beginmfpic(incr code);\n"); setpen(1); --- 102,109 ---- fprintf(tfp,"%%\n%% %s (char %d)\n%%\n", (name? name: ((from) ? from : "stdin")), ++curchar); ! fprintf(tfp,"xscale:=%.3f; yscale:=%.3f;\n", xscale*mag, yscale*mag); ! fprintf(tfp,"bounds(%.3f,%.3f,%.3f,%.3f);\n", xl, xu, yl, yu); fprintf(tfp,"unitlen:=1.0in#;\n"); fprintf(tfp,"beginmfpic(incr code);\n"); setpen(1); *************** *** 181,187 **** if (l->fill_style == BLACK_FILL) fprintf(tfp," filled "); else if (l->fill_style < BLACK_FILL && l->fill_style > 0) ! fprintf(tfp," shade(%lfpt) unfilled", dofill(l)); else if (l->fill_style == 0) fprintf(tfp," drawn unfilled "); else --- 179,185 ---- if (l->fill_style == BLACK_FILL) fprintf(tfp," filled "); else if (l->fill_style < BLACK_FILL && l->fill_style > 0) ! fprintf(tfp," shade(%fpt) unfilled", dofill(l)); else if (l->fill_style == 0) fprintf(tfp," drawn unfilled "); else *************** *** 189,198 **** fprintf(tfp,"polyline(true)\n"); } p = l->points; ! fprintf(tfp," ((%lf, %lf)", p->x/ppi, maxy-(p->y/ppi)); p = p->next; for ( ; p != NULL; p=p->next) { ! fprintf(tfp,",\n (%lf, %lf)", p->x/ppi, maxy-(p->y/ppi)); } fprintf(tfp, ");\n"); return; --- 187,196 ---- fprintf(tfp,"polyline(true)\n"); } p = l->points; ! fprintf(tfp," ((%f, %f)", p->x/ppi, maxy-(p->y/ppi)); p = p->next; for ( ; p != NULL; p=p->next) { ! fprintf(tfp,",\n (%f, %f)", p->x/ppi, maxy-(p->y/ppi)); } fprintf(tfp, ");\n"); return; *************** *** 216,222 **** if (s->fill_style == BLACK_FILL) fprintf(tfp," filled "); else if (s->fill_style < BLACK_FILL && s->fill_style > 0) ! fprintf(tfp," shade(%lfpt) unfilled ", dofill(s)); else if (s->fill_style == 0) fprintf(tfp," drawn unfilled "); else --- 214,220 ---- if (s->fill_style == BLACK_FILL) fprintf(tfp," filled "); else if (s->fill_style < BLACK_FILL && s->fill_style > 0) ! fprintf(tfp," shade(%fpt) unfilled ", dofill(s)); else if (s->fill_style == 0) fprintf(tfp," drawn unfilled "); else *************** *** 224,233 **** fprintf(tfp,"curve(true)\n"); } p = s->points; ! fprintf(tfp," ((%lf, %lf)", p->x/ppi, maxy-(p->y/ppi)); p = p->next; for ( ; p != NULL; p=p->next) { ! fprintf(tfp,",\n (%lf, %lf)", p->x/ppi, maxy-(p->y/ppi)); } fprintf(tfp, ");\n"); return; --- 222,231 ---- fprintf(tfp,"curve(true)\n"); } p = s->points; ! fprintf(tfp," ((%f, %f)", p->x/ppi, maxy-(p->y/ppi)); p = p->next; for ( ; p != NULL; p=p->next) { ! fprintf(tfp,",\n (%f, %f)", p->x/ppi, maxy-(p->y/ppi)); } fprintf(tfp, ");\n"); return; *************** *** 246,262 **** if (e->fill_style == BLACK_FILL) fprintf(tfp," filled "); else if (e->fill_style < BLACK_FILL && e->fill_style > 0) ! fprintf(tfp," shade(%lfpt) ", dofill(e)); else fprintf(tfp," drawn "); if (e->type == 3 || e->type == 4) { ! fprintf(tfp,"circle((%lf,%lf),%lf);\n", e->center.x/ppi, maxy-(e->center.y/ppi), e->radiuses.x/ppi); } else if (e->type == 1 || e->type == 2) { ! fprintf(tfp,"ellipse((%lf,%lf),%lf,%lf,0);\n", e->center.x/ppi, maxy-(e->center.y/ppi), e->radiuses.x/ppi, e->radiuses.y/ppi); } --- 244,260 ---- if (e->fill_style == BLACK_FILL) fprintf(tfp," filled "); else if (e->fill_style < BLACK_FILL && e->fill_style > 0) ! fprintf(tfp," shade(%fpt) ", dofill(e)); else fprintf(tfp," drawn "); if (e->type == 3 || e->type == 4) { ! fprintf(tfp,"circle((%f,%f),%f);\n", e->center.x/ppi, maxy-(e->center.y/ppi), e->radiuses.x/ppi); } else if (e->type == 1 || e->type == 2) { ! fprintf(tfp,"ellipse((%f,%f),%f,%f,0);\n", e->center.x/ppi, maxy-(e->center.y/ppi), e->radiuses.x/ppi, e->radiuses.y/ppi); } *************** *** 271,277 **** setpen(a->thickness); fprintf(tfp, " store (curpath)\n"); ! fprintf(tfp," drawn arcppp((%lf,%lf), (%lf,%lf), (%lf,%lf));\n", a->point[0].x/ppi, maxy-(a->point[0].y/ppi), a->point[1].x/ppi, maxy-(a->point[1].y/ppi), a->point[2].x/ppi, maxy-(a->point[2].y/ppi)); --- 269,275 ---- setpen(a->thickness); fprintf(tfp, " store (curpath)\n"); ! fprintf(tfp," drawn arcppp((%f,%f), (%f,%f), (%f,%f));\n", a->point[0].x/ppi, maxy-(a->point[0].y/ppi), a->point[1].x/ppi, maxy-(a->point[1].y/ppi), a->point[2].x/ppi, maxy-(a->point[2].y/ppi)); diff -rc transfig.3.2.3/fig2dev/dev/genpdf.c transfig.3.2.3b/fig2dev/dev/genpdf.c *** transfig.3.2.3/fig2dev/dev/genpdf.c Wed Nov 24 14:31:06 1999 --- transfig.3.2.3b/fig2dev/dev/genpdf.c Tue Jul 11 14:50:49 2000 *************** *** 18,24 **** * * Author: Brian V. Smith * Uses genps functions to generate PostScript output then ! * calls ps2pdf (which uses ghostscript) to convert it to pdf. */ #if defined(hpux) || defined(SYSV) || defined(SVR4) --- 18,24 ---- * * Author: Brian V. Smith * Uses genps functions to generate PostScript output then ! * calls ghostscript (device pdfwrite) to convert it to pdf. */ #if defined(hpux) || defined(SYSV) || defined(SVR4) *************** *** 30,47 **** #include "object.h" #include "texfonts.h" ! extern void ! genps_arc(), ! genps_ellipse(), ! genps_line(), ! genps_spline(), ! genps_text(); ! ! static char com[1000]; ! Boolean direct; ! FILE *saveofile; ! char *ofile; ! char tempfile[PATH_MAX]; void genpdf_option(opt, optarg) --- 30,39 ---- #include "object.h" #include "texfonts.h" ! static Boolean direct; ! static FILE *saveofile; ! static char *ofile; ! static char tempfile[PATH_MAX]; void genpdf_option(opt, optarg) *************** *** 49,55 **** char *optarg; { /* just use the ps options */ ! genps_option(opt, optarg); } void --- 41,49 ---- char *optarg; { /* just use the ps options */ ! pdfflag = 1; ! epsflag = 0; ! gen_ps_eps_option(opt, optarg); } void *************** *** 56,71 **** genpdf_start(objects) F_compound *objects; { ! ! /* change output from ps driver to a temp file because ! ps2pdf only works with files, not pipes */ /* but first close the output file that main() opened */ saveofile = tfp; if (tfp != stdout) fclose(tfp); ! sprintf(tempfile, "fig2dev-%d", getpid()); ! if ((tfp = fopen(tempfile,"w" )) == 0) { ! fprintf(stderr,"Can't open temporary file %s\n",tempfile); exit(1); } genps_start(objects); --- 50,68 ---- genpdf_start(objects) F_compound *objects; { ! /* divert output from ps driver to the pipe into ghostscript */ /* but first close the output file that main() opened */ saveofile = tfp; if (tfp != stdout) fclose(tfp); ! ! /* make up the command for gs */ ! ofile = (to == NULL? "-": to); ! sprintf(gscom, "gs -q -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=%s - -c quit", ofile); ! (void) signal(SIGPIPE, gs_broken_pipe); ! if ((tfp = popen(gscom,"w" )) == 0) { ! fprintf(stderr,"fig2dev: Can't open pipe to ghostscript\n"); ! fprintf(stderr,"command was: %s\n", gscom); exit(1); } genps_start(objects); *************** *** 74,114 **** int genpdf_end() { ! char com[500],tempofile[PATH_MAX]; ! int status = 0; - sprintf(tempfile, "fig2dev-%d", getpid()); - /* wrap up the postscript output */ if (genps_end() != 0) ! return -1; ! /* add a showpage so the pdf will have a page */ fprintf(tfp, "showpage\n"); - fclose(tfp); ! /* if no output file specified, put in temp and cat it */ ! if (to==NULL) { ! sprintf(tempofile,"fig2dev-%d.pdf", getpid()); ! to = tempofile; ! } ! /* make up the command for ps2pdf */ ! sprintf(com, "ps2pdf %s %s", tempfile, to); ! /* run it */ ! if (system(com) != 0) ! status = -1; ! ! /* finally, remove the temporary file */ ! unlink(tempfile); ! /* cat the temp output file if any */ ! if (to == tempofile) { ! sprintf(com,"cat %s",tempofile); ! system(com); ! /* and remove it */ ! unlink(tempofile); } ! /* we've already closed the original output file */ ! tfp = 0; return status; } --- 71,96 ---- int genpdf_end() { ! char com[PATH_MAX*2],tempofile[PATH_MAX]; ! FILE *tmpfile; ! int status = 0; ! int num; /* wrap up the postscript output */ if (genps_end() != 0) ! return -1; /* error, return now */ ! /* add a showpage so ghostscript will produce output */ fprintf(tfp, "showpage\n"); ! if (pclose(tfp) != 0) { ! fprintf(stderr,"Error in ghostcript command\n"); ! fprintf(stderr,"command was: %s\n", gscom); ! return -1; } ! (void) signal(SIGPIPE, SIG_DFL); ! ! /* all ok so far */ return status; } diff -rc transfig.3.2.3/fig2dev/dev/genpic.c transfig.3.2.3b/fig2dev/dev/genpic.c *** transfig.3.2.3/fig2dev/dev/genpic.c Wed Nov 24 14:31:08 1999 --- transfig.3.2.3b/fig2dev/dev/genpic.c Tue Jul 11 14:50:52 2000 *************** *** 44,51 **** void genpic_open_spline(), genpic_closed_spline(); #define TOP 10.5 /* top of page is 10.5 inch */ - static double ppi; - static int CONV = 0; static int LineThickness = 0; static int OptArcBox = 0; /* Conditional use */ static int OptLineThick = 0; --- 44,49 ---- *************** *** 113,119 **** double convy(a) double a; { ! return((double)(CONV ? TOP-a : a)); } void --- 111,117 ---- double convy(a) double a; { ! return((double) TOP-a); } void *************** *** 120,130 **** genpic_start(objects) F_compound *objects; { ! int coord_system; ! ! ppi = objects->nwcorner.x/mag; ! coord_system = objects->nwcorner.y; ! if (coord_system == 2) CONV = 1; /* print any whole-figure comments prefixed with '.\" ' */ if (objects->comments) { --- 118,124 ---- genpic_start(objects) F_compound *objects; { ! ppi = ppi/mag; /* print any whole-figure comments prefixed with '.\" ' */ if (objects->comments) { diff -rc transfig.3.2.3/fig2dev/dev/genpictex.c transfig.3.2.3b/fig2dev/dev/genpictex.c *** transfig.3.2.3/fig2dev/dev/genpictex.c Wed Nov 24 14:31:12 1999 --- transfig.3.2.3b/fig2dev/dev/genpictex.c Wed May 3 13:47:04 2000 *************** *** 44,50 **** static draw_arrow_head(); #define rint(a) floor((a)+0.5) /* close enough? */ - static int coord_system; static double dash_length = -1; static int line_style = SOLID_LINE; static char *linethick = "1pt"; --- 44,49 ---- *************** *** 103,116 **** } #define TOP 10.5 /* top of page is 10.5 inch */ - static double ppi; - static int CONV = 0; static double convy(a) double a; { ! return((double)(CONV ? TOP-a : a)); } void --- 102,113 ---- } #define TOP 10.5 /* top of page is 10.5 inch */ static double convy(a) double a; { ! return((double) TOP-a); } void *************** *** 119,128 **** { texfontsizes[0] = texfontsizes[1] = TEXFONTSIZE(font_size?font_size:DEFAULT_FONT_SIZE); - - coord_system = objects->nwcorner.y; - ppi = objects->nwcorner.x; - if (coord_system == 2) CONV = 1; /* PiCTeX start */ --- 116,121 ---- diff -rc transfig.3.2.3/fig2dev/dev/genps.c transfig.3.2.3b/fig2dev/dev/genps.c *** transfig.3.2.3/fig2dev/dev/genps.c Mon Jan 10 15:19:17 2000 --- transfig.3.2.3b/fig2dev/dev/genps.c Tue Jul 11 14:51:21 2000 *************** *** 61,71 **** /* include the PostScript preamble, patterns etc */ #include "genps.h" - typedef struct _point - { - int x,y; - } Point; - #define POINT_PER_INCH 72 #define ULIMIT_FONT_SIZE 300 --- 61,66 ---- *************** *** 74,86 **** void gen_ps_eps_option(); Boolean epsflag = False; /* to distinguish PS and EPS */ int pagewidth = -1; int pageheight = -1; int xoff=0; int yoff=0; - static int coord_system; - static int resolution; static double cur_thickness = 0.0; static int cur_joinstyle = 0; static int cur_capstyle = 0; --- 69,80 ---- void gen_ps_eps_option(); Boolean epsflag = False; /* to distinguish PS and EPS */ + Boolean pdfflag = False; /* to distinguish PDF and PS/EPS */ int pagewidth = -1; int pageheight = -1; int xoff=0; int yoff=0; static double cur_thickness = 0.0; static int cur_joinstyle = 0; static int cur_capstyle = 0; *************** *** 99,111 **** static arc_tangent(); static fill_area(); static clip_arrows(); - static calc_arrow(); static draw_arrow(); static iso_text_exist(); static encode_all_fonts(); static ellipse_exist(); static approx_spline_exist(); ! static double compute_angle(); #define SHADEVAL(F) 1.0*(F)/(NUMSHADES-1) #define TINTVAL(F) 1.0*(F-NUMSHADES+1)/NUMTINTS --- 93,104 ---- static arc_tangent(); static fill_area(); static clip_arrows(); static draw_arrow(); static iso_text_exist(); static encode_all_fonts(); static ellipse_exist(); static approx_spline_exist(); ! static set_linewidth(); #define SHADEVAL(F) 1.0*(F)/(NUMSHADES-1) #define TINTVAL(F) 1.0*(F-NUMSHADES+1)/NUMTINTS *************** *** 186,252 **** 8, -16, }; - /************** ARRAY FOR ARROW SHAPES **************/ - - struct _fpnt { - double x,y; - }; - struct _arrow_shape { - int numpts; - int tipno; - double tipmv; - struct _fpnt points[6]; - }; - - #define NUM_ARROW_TYPES 21 - static struct _arrow_shape arrow_shapes[NUM_ARROW_TYPES+1] = { - /* number of points, index of tip, {datapairs} */ - /* first point must be upper-left point of tail, then tip */ - - /* type 0 */ - { 3, 1, 2.15, {{-1,0.5}, {0,0}, {-1,-0.5}}}, - /* place holder for what would be type 0 filled */ - { 0 }, - /* type 1 simple triangle */ - { 4, 1, 2.1, {{-1.0,0.5}, {0,0}, {-1.0,-0.5}, {-1.0,0.5}}}, - /* type 1 filled simple triangle*/ - { 4, 1, 2.1, {{-1.0,0.5}, {0,0}, {-1.0,-0.5}, {-1.0,0.5}}}, - /* type 2 concave spearhead */ - { 5, 1, 2.6, {{-1.25,0.5},{0,0},{-1.25,-0.5},{-1.0,0},{-1.25,0.5}}}, - /* type 2 filled concave spearhead */ - { 5, 1, 2.6, {{-1.25,0.5},{0,0},{-1.25,-0.5},{-1.0,0},{-1.25,0.5}}}, - /* type 3 convex spearhead */ - { 5, 1, 1.5, {{-0.75,0.5},{0,0},{-0.75,-0.5},{-1.0,0},{-0.75,0.5}}}, - /* type 3 filled convex spearhead */ - { 5, 1, 1.5, {{-0.75,0.5},{0,0},{-0.75,-0.5},{-1.0,0},{-0.75,0.5}}}, - /* type 4 diamond */ - { 5, 1, 1.15, {{-0.5,0.5},{0,0},{-0.5,-0.5},{-1.0,0},{-0.5,0.5}}}, - /* type 4 filled diamond */ - { 5, 1, 1.15, {{-0.5,0.5},{0,0},{-0.5,-0.5},{-1.0,0},{-0.5,0.5}}}, - /* type 5 circle - handled in code */ - { 0, 0, 0.0 }, { 0, 0, 0.0 }, - /* type 6 half circle - handled in code */ - { 0, 0, -1.0 }, { 0, 0, -1.0 }, - /* type 7 square */ - { 5, 1, 0.0, {{-1.0,0.5},{0,0.5},{0,-0.5},{-1.0,-0.5},{-1.0,0.5}}}, - /* type 7 filled square */ - { 5, 1, 0.0, {{-1.0,0.5},{0,0.5},{0,-0.5},{-1.0,-0.5},{-1.0,0.5}}}, - /* type 8 reverse triangle */ - { 4, 1, 0.0, {{-1.0,0},{0,0.5},{0,-0.5},{-1.0,0}}}, - /* type 8 filled reverse triangle */ - { 4, 1, 0.0, {{-1.0,0},{0,0.5},{0,-0.5},{-1.0,0}}}, - /* type 9a "wye" */ - { 3, 0, -1.0, {{0,0.5},{-1.0,0},{0,-0.5}}}, - /* type 9b bar */ - { 2, 1, 0.0, {{0,0.5},{0,-0.5}}}, - /* type 10a two-prong fork */ - { 4, 0, -1.0, {{0,0.5},{-1.0,0.5},{-1.0,-0.5},{0,-0.5}}}, - /* type 10b backward two-prong fork */ - { 4, 1, 0.0, {{-1.0,0.5,},{0,0.5},{0,-0.5},{-1.0,-0.5}}}, - }; static double scalex, scaley; static double origx, origy; void geneps_option(opt, optarg) char opt; --- 179,239 ---- 8, -16, }; static double scalex, scaley; static double origx, origy; + FILE *open_picfile(); + void close_picfile(); + int filtype; + extern int read_gif(); + extern int read_pcx(); + extern int read_eps(); + extern int read_pdf(); + extern int read_ppm(); + extern int read_tif(); + extern int read_xbm(); + #ifdef USE_JPEG + extern int read_jpg(); + #endif + #ifdef USE_XPM + extern int read_xpm(); + #endif + + /* headers for various image files */ + + static struct hdr { + char *type; + char *bytes; + int nbytes; + int (*readfunc)(); + Boolean pipeok; + } + headers[]= { {"GIF", "GIF", 3, read_gif, True}, + #ifdef V4_0 + {"FIG", "#FIG", 4, read_figure, True}, + #endif /* V4_0 */ + {"PCX", "\012\005\001", 3, read_pcx, True}, + {"EPS", "%!", 2, read_eps, True}, + {"PDF", "%PDF", 4, read_pdf, True}, + {"PPM", "P3", 2, read_ppm, True}, + {"PPM", "P6", 2, read_ppm, True}, + {"TIFF", "II*\000", 4, read_tif, False}, + {"TIFF", "MM\000*", 4, read_tif, False}, + {"XBM", "#define", 7, read_xbm, True}, + #ifdef USE_JPEG + {"JPEG", "\377\330\377\340", 4, read_jpg, True}, + #endif + #ifdef USE_XPM + {"XPM", "/* XPM */", 9, read_xpm, False}, + #endif + }; + + #define NUMHEADERS sizeof(headers)/sizeof(headers[0]) + + /******************************/ + /* various methods start here */ + /******************************/ + void geneps_option(opt, optarg) char opt; *************** *** 253,258 **** --- 240,246 ---- char *optarg; { epsflag = True; + pdfflag = False; gen_ps_eps_option(opt, optarg); } *************** *** 262,267 **** --- 250,256 ---- char *optarg; { epsflag = False; + pdfflag = False; gen_ps_eps_option(opt, optarg); } *************** *** 297,304 **** if ( !strcmp(optarg, PSfontnames[i]) ) break; if ( i > MAX_PSFONT ) ! fprintf(stderr, ! "warning: non-standard font name %s\n", optarg); psfontnames[0] = psfontnames[1] = optarg; PSfontnames[0] = PSfontnames[1] = optarg; --- 286,292 ---- if ( !strcmp(optarg, PSfontnames[i]) ) break; if ( i > MAX_PSFONT ) ! fprintf(stderr, "warning: non-standard font name %s\n", optarg); psfontnames[0] = psfontnames[1] = optarg; PSfontnames[0] = PSfontnames[1] = optarg; *************** *** 305,311 **** break; case 'g': /* background color */ ! if (lookup_db_color(optarg,&background) >= 0) { bgspec = True; } else { fprintf(stderr,"Can't parse color '%s', ignoring background option\n", --- 293,299 ---- break; case 'g': /* background color */ ! if (lookup_X_color(optarg,&background) >= 0) { bgspec = True; } else { fprintf(stderr,"Can't parse color '%s', ignoring background option\n", *************** *** 312,318 **** optarg); } break; ! case 'M': /* multi-page option */ if (!epsflag) { multi_page = True; --- 300,306 ---- optarg); } break; ! case 'M': /* multi-page option */ if (!epsflag) { multi_page = True; *************** *** 390,404 **** int itmp; int cliplx, cliply, clipux, clipuy; struct paperdef *pd; - float bd; char *libdir; char filename[512], str[512]; FILE *fp; ! resolution = objects->nwcorner.x; ! coord_system = objects->nwcorner.y; ! scalex = scaley = mag * POINT_PER_INCH / (double)resolution; /* this seems to work around Solaris' cc optimizer bug */ /* the problem was that llx had garbage in it - this "fixes" it */ --- 378,389 ---- int itmp; int cliplx, cliply, clipux, clipuy; struct paperdef *pd; char *libdir; char filename[512], str[512]; FILE *fp; ! scalex = scaley = mag * POINT_PER_INCH / ppi; /* this seems to work around Solaris' cc optimizer bug */ /* the problem was that llx had garbage in it - this "fixes" it */ *************** *** 411,422 **** ury = (int)ceil(ury * scaley); /* adjust for any border margin */ - bd = border_margin; ! llx -= bd; ! lly -= bd; ! urx += bd; ! ury += bd; /* convert ledger (deprecated) to tabloid */ if (strcasecmp(papersize, "ledger") == 0) --- 396,406 ---- ury = (int)ceil(ury * scaley); /* adjust for any border margin */ ! llx -= border_margin; ! lly -= border_margin; ! urx += border_margin; ! ury += border_margin; /* convert ledger (deprecated) to tabloid */ if (strcasecmp(papersize, "ledger") == 0) *************** *** 434,443 **** exit (1); } ! if (epsflag) { ! /* eps, shift figure to 0,0 */ origx = -llx; origy = ury; } else { /* postscript, do any orientation and/or centering */ if (landscape) { --- 418,431 ---- exit (1); } ! if (epsflag || pdfflag) { ! /* eps or pdf, shift figure to 0,0 */ origx = -llx; origy = ury; + if (pdfflag && landscape) { + origx = -lly; + origy = -llx; + } } else { /* postscript, do any orientation and/or centering */ if (landscape) { *************** *** 460,466 **** } /* finally, adjust by any offset the user wants */ ! if (!epsflag) { if (landscape) { origx += yoff; origy += xoff; --- 448,454 ---- } /* finally, adjust by any offset the user wants */ ! if (!epsflag || pdfflag) { if (landscape) { origx += yoff; origy += xoff; *************** *** 491,510 **** /* calc initial clipping area to size of the bounding box (this is needed for later clipping by arrowheads */ cliplx = cliply = 0; ! if (epsflag) { clipux = urx-llx; clipuy = ury-lly; pages = 1; } else { if (landscape) { clipux = pageheight; clipuy = pagewidth; ! pages = (urx/pageheight+1)*(ury/pagewidth+1); fprintf(tfp, "%%%%Orientation: Landscape\n"); } else { clipux = pagewidth; clipuy = pageheight; ! pages = (urx/pagewidth+1)*(ury/pageheight+1); fprintf(tfp, "%%%%Orientation: Portrait\n"); } /* only print Pages if PostScript */ --- 479,506 ---- /* calc initial clipping area to size of the bounding box (this is needed for later clipping by arrowheads */ cliplx = cliply = 0; ! if (epsflag || pdfflag) { clipux = urx-llx; clipuy = ury-lly; + if (pdfflag && landscape) { + clipux = ury-lly; + clipuy = urx-llx; + } pages = 1; } else { if (landscape) { clipux = pageheight; clipuy = pagewidth; ! /* account for overlap */ ! pages = (int)(1.11111*(urx-0.1*pageheight)/pageheight+1)* ! (int)(1.11111*(ury-0.1*pagewidth)/pagewidth+1); fprintf(tfp, "%%%%Orientation: Landscape\n"); } else { clipux = pagewidth; clipuy = pageheight; ! /* account for overlap */ ! pages = (int)(1.11111*(urx-0.1*pagewidth)/pagewidth+1)* ! (int)(1.11111*(ury-0.1*pageheight)/pageheight+1); fprintf(tfp, "%%%%Orientation: Portrait\n"); } /* only print Pages if PostScript */ *************** *** 513,523 **** fprintf(tfp, "%%%%BoundingBox: %d %d %d %d\n", cliplx, cliply, clipux, clipuy); ! /* only include a pagesize command if not EPS */ ! if (!epsflag) { fprintf(tfp, "%%%%BeginSetup\n"); fprintf(tfp, "%%%%IncludeFeature: *PageSize %s\n", papersize); fprintf(tfp, "%%%%EndSetup\n"); } /* put in the magnification for information purposes */ --- 509,525 ---- fprintf(tfp, "%%%%BoundingBox: %d %d %d %d\n", cliplx, cliply, clipux, clipuy); ! /* only include a pagesize command if PS */ ! if (!epsflag && !pdfflag) { fprintf(tfp, "%%%%BeginSetup\n"); fprintf(tfp, "%%%%IncludeFeature: *PageSize %s\n", papersize); fprintf(tfp, "%%%%EndSetup\n"); + } else if (pdfflag) { + /* set the page size for PDF */ + if (landscape) + fprintf(tfp, "<< /PageSize [%d %d] >> setpagedevice\n",ury-lly,urx-llx); + else + fprintf(tfp, "<< /PageSize [%d %d] >> setpagedevice\n",urx-llx,ury-lly); } /* put in the magnification for information purposes */ *************** *** 540,549 **** #endif if (libdir != NULL) { sprintf(filename, "%s/%s.ps", libdir, papersize); ! /* get filename like "/usr/local/lib/fig2dev/A3.ps" */ ! fp = fopen(filename, "r"); if (fp != NULL) { ! while (fgets(str, sizeof(str), fp)) fputs(str, tfp); fclose(fp); } } --- 542,553 ---- #endif if (libdir != NULL) { sprintf(filename, "%s/%s.ps", libdir, papersize); ! /* get filename like "/usr/local/lib/fig2dev/A3.ps" and ! prepend it to the postscript code */ ! fp = fopen(filename, "rb"); if (fp != NULL) { ! while (fgets(str, sizeof(str), fp)) ! fputs(str, tfp); fclose(fp); } } *************** *** 582,593 **** if (landscape && !epsflag) { fprintf(tfp, " 90 rotate\n"); } ! if (coord_system == 2) { ! fprintf(tfp, "1 -1 scale\n"); ! } if (pats_used) { int i; - fprintf(tfp, ".9 .9 scale %% to make patterns same scale as in xfig\n"); fprintf(tfp, "\n%s%s%s", FILL_PROLOG1,FILL_PROLOG2,FILL_PROLOG3); fprintf(tfp, "\n%s%s%s", FILL_PROLOG4,FILL_PROLOG5,FILL_PROLOG6); fprintf(tfp, "\n%s%s%s", FILL_PROLOG7,FILL_PROLOG8,FILL_PROLOG9); --- 586,595 ---- if (landscape && !epsflag) { fprintf(tfp, " 90 rotate\n"); } ! /* increasing y goes down */ ! fprintf(tfp, "1 -1 scale\n"); if (pats_used) { int i; fprintf(tfp, "\n%s%s%s", FILL_PROLOG1,FILL_PROLOG2,FILL_PROLOG3); fprintf(tfp, "\n%s%s%s", FILL_PROLOG4,FILL_PROLOG5,FILL_PROLOG6); fprintf(tfp, "\n%s%s%s", FILL_PROLOG7,FILL_PROLOG8,FILL_PROLOG9); *************** *** 596,602 **** for (i=0; i 0.0) fprintf(tfp, " [%d] 0 sd\n", round(v)); } else if (s == DOTTED_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d] %d sd\n", ! round(resolution/80.0), round(v), round(v)); } else if (s == DASH_DOT_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d %d %d] 0 sd\n", round(v), round(v*0.5), ! round(resolution/80.0), round(v*0.5)); } else if (s == DASH_2_DOTS_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d %d %d %d %d] 0 sd\n", round(v), round(v*0.45), ! round(resolution/80.0), round(v*0.333), ! round(resolution/80.0), round(v*0.45)); } else if (s == DASH_3_DOTS_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d %d %d %d %d %d %d ] 0 sd\n", round(v), round(v*0.4), ! round(resolution/80.0), round(v*0.3), ! round(resolution/80.0), round(v*0.3), ! round(resolution/80.0), round(v*0.4)); } } --- 709,740 ---- int s; double v; { ! v /= 80.0 / ppi; if (s == DASH_LINE) { if (v > 0.0) fprintf(tfp, " [%d] 0 sd\n", round(v)); } else if (s == DOTTED_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d] %d sd\n", ! round(ppi/80.0), round(v), round(v)); } else if (s == DASH_DOT_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d %d %d] 0 sd\n", round(v), round(v*0.5), ! round(ppi/80.0), round(v*0.5)); } else if (s == DASH_2_DOTS_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d %d %d %d %d] 0 sd\n", round(v), round(v*0.45), ! round(ppi/80.0), round(v*0.333), ! round(ppi/80.0), round(v*0.45)); } else if (s == DASH_3_DOTS_LINE) { if (v > 0.0) fprintf(tfp, " [%d %d %d %d %d %d %d %d ] 0 sd\n", round(v), round(v*0.4), ! round(ppi/80.0), round(v*0.3), ! round(ppi/80.0), round(v*0.3), ! round(ppi/80.0), round(v*0.4)); } } *************** *** 783,836 **** } } - FILE *open_picfile(); - void close_picfile(); - int filtype; - extern int read_gif(); - extern int read_pcx(); - extern int read_eps(); - extern int read_pdf(); - extern int read_ppm(); - extern int read_tif(); - extern int read_xbm(); - #ifdef USE_JPEG - extern int read_jpg(); - #endif - #ifdef USE_XPM - extern int read_xpm(); - #endif - - /* headers for various image files */ - - static struct hdr { - char *type; - char *bytes; - int nbytes; - int (*readfunc)(); - Boolean pipeok; - } - headers[]= { {"GIF", "GIF", 3, read_gif, True}, - #ifdef V4_0 - {"FIG", "#FIG", 4, read_figure, True}, - #endif /* V4_0 */ - {"PCX", "\012\005\001", 3, read_pcx, True}, - {"EPS", "%!", 2, read_eps, True}, - {"PDF", "%PDF", 4, read_pdf, True}, - {"PPM", "P3", 2, read_ppm, True}, - {"PPM", "P6", 2, read_ppm, True}, - {"TIFF", "DD*\000", 4, read_tif, False}, - {"TIFF", "MM\000*", 4, read_tif, False}, - {"XBM", "#define", 7, read_xbm, True}, - #ifdef USE_JPEG - {"JPEG", "\377\330\377\340", 4, read_jpg, True}, - #endif - #ifdef USE_XPM - {"XPM", "/* XPM */", 9, read_xpm, False}, - #endif - }; - - #define NUMHEADERS sizeof(headers)/sizeof(headers[0]) - void genps_line(l) --- 789,794 ---- *************** *** 932,940 **** fprintf(tfp, "%%\n"); /* open the file and read a few bytes of the header to see what it is */ if ((picf=open_picfile(l->pic->file, &filtype, True, realname)) == NULL) { ! fprintf(stderr,"No such picture file: %s",l->pic->file); return; } --- 890,901 ---- fprintf(tfp, "%%\n"); + fprintf(tfp, "%% pen to black in case this eps object doesn't set color first\n"); + fprintf(tfp, "0 0 0 setrgbcolor\n"); + /* open the file and read a few bytes of the header to see what it is */ if ((picf=open_picfile(l->pic->file, &filtype, True, realname)) == NULL) { ! fprintf(stderr,"No such picture file: %s\n",l->pic->file); return; } *************** *** 962,968 **** if (headers[i].pipeok) { if (((*headers[i].readfunc)(picf,filtype,l->pic,&llx,&lly)) == 0) { ! fprintf(stderr,"%s: Bad %s format",l->pic->file, headers[i].type); close_picfile(picf,filtype); return; } --- 923,929 ---- if (headers[i].pipeok) { if (((*headers[i].readfunc)(picf,filtype,l->pic,&llx,&lly)) == 0) { ! fprintf(stderr,"%s: Bad %s format\n",l->pic->file, headers[i].type); close_picfile(picf,filtype); return; } *************** *** 969,975 **** } else { /* routines that can't take a pipe (e.g. xpm) get the real filename */ if (((*headers[i].readfunc)(realname,filtype,l->pic,&llx,&lly)) == 0) { ! fprintf(stderr,"%s: Bad %s format",l->pic->file, headers[i].type); close_picfile(picf,filtype); return; } --- 930,936 ---- } else { /* routines that can't take a pipe (e.g. xpm) get the real filename */ if (((*headers[i].readfunc)(realname,filtype,l->pic,&llx,&lly)) == 0) { ! fprintf(stderr,"%s: Bad %s format\n",l->pic->file, headers[i].type); close_picfile(picf,filtype); return; } *************** *** 1156,1165 **** fprintf(tfp, "%% JPEG image follows:\n"); /* scale for size in bits */ fprintf(tfp, "%d %d sc\n", urx, ury); ! /* now write out the image data in a compressed form */ ! (void) PSencode(tfp, wid, ht, l->pic->numcols, l->pic->cmap[0], l->pic->cmap[1], l->pic->cmap[2], l->pic->bitmap); /* EPS file */ } else if (l->pic->subtype == P_EPS) { --- 1117,1131 ---- fprintf(tfp, "%% JPEG image follows:\n"); /* scale for size in bits */ fprintf(tfp, "%d %d sc\n", urx, ury); ! if (l->pic->numcols > 256) { ! /* 24-bit image, write rgb values */ ! (void) PSrgbimage(tfp, wid, ht, l->pic->bitmap); ! } else { ! /* now write out the image data in a compressed form */ ! (void) PSencode(tfp, wid, ht, l->pic->numcols, l->pic->cmap[0], l->pic->cmap[1], l->pic->cmap[2], l->pic->bitmap); + } /* EPS file */ } else if (l->pic->subtype == P_EPS) { *************** *** 1167,1173 **** fprintf(tfp, "%% EPS file follows:\n"); if ((picf=open_picfile(l->pic->file, &filtype, True, realname)) == NULL) { fprintf(stderr, "Unable to open EPS file '%s': error: %s (%d)\n", ! l->pic->file, sys_errlist[errno],errno); fprintf(tfp, "gr\n"); return; } --- 1133,1139 ---- fprintf(tfp, "%% EPS file follows:\n"); if ((picf=open_picfile(l->pic->file, &filtype, True, realname)) == NULL) { fprintf(stderr, "Unable to open EPS file '%s': error: %s (%d)\n", ! l->pic->file, strerror(errno),errno); fprintf(tfp, "gr\n"); return; } *************** *** 1493,1502 **** sx = a->point[0].x; sy = a->point[0].y; ex = a->point[2].x; ey = a->point[2].y; ! if (coord_system != 2) ! direction = !a->direction; ! else ! direction = a->direction; set_linewidth((double)a->thickness); set_linecap(a->cap_style); dx = cx - sx; --- 1459,1465 ---- sx = a->point[0].x; sy = a->point[0].y; ex = a->point[2].x; ey = a->point[2].y; ! direction = a->direction; set_linewidth((double)a->thickness); set_linecap(a->cap_style); dx = cx - sx; *************** *** 1615,1621 **** unsigned char ch; #endif /* I18N */ ! /* ignore hidden text (new for xfig3.2.3/fig2dev3.2.2) */ if (hidden_text(t)) return; --- 1578,1584 ---- unsigned char ch; #endif /* I18N */ ! /* ignore hidden text (new for xfig3.2.3/fig2dev3.2.3) */ if (hidden_text(t)) return; *************** *** 1642,1649 **** fprintf(tfp, TEXT_PS, PSFONT(t), "", PSFONTMAG(t)); fprintf(tfp, "%d %d m\ngs ", t->base_x, t->base_y); ! if (coord_system == 2) ! fprintf(tfp, "1 -1 sc "); if (t->angle != 0) fprintf(tfp, " %.1f rot ", t->angle*180.0/M_PI); --- 1605,1611 ---- fprintf(tfp, TEXT_PS, PSFONT(t), "", PSFONTMAG(t)); fprintf(tfp, "%d %d m\ngs ", t->base_x, t->base_y); ! fprintf(tfp, "1 -1 sc "); if (t->angle != 0) fprintf(tfp, " %.1f rot ", t->angle*180.0/M_PI); *************** *** 1840,2072 **** fprintf(tfp, "eoclip\n"); } - /**************************************************************** - - calc_arrow - calculate points heading from (x1, y1) to (x2, y2) - - Must pass POINTER to npoints for return value and for c1x, c1y, - c2x, c2y, which are two points at the end of the arrowhead so: - - |\ + (c1x,c1y) - | \ - | \ - ---------------| \ - | / - | / - | / - |/ + (c2x,c2y) - - - Fills points array with npoints arrowhead coordinates - - ****************************************************************/ - - static - calc_arrow(x1, y1, x2, y2, c1x, c1y, c2x, c2y, arrow, points, npoints, nboundpts) - int x1, y1, x2, y2; - int *c1x, *c1y, *c2x, *c2y; - F_arrow *arrow; - Point points[]; - int *npoints, *nboundpts; - { - double x, y, xb, yb, dx, dy, l, sina, cosa; - double mx, my; - double ddx, ddy, lpt, tipmv; - double alpha; - double miny, maxy; - double thick; - int xa, ya, xs, ys; - double xt, yt; - float wd = arrow->wid; - float ht = arrow->ht; - int type, style, indx; - int i, np; - - /* types = 0...10 */ - type = arrow->type; - /* style = 0 (unfilled) or 1 (filled) */ - style = arrow->style; - /* index into shape array */ - indx = 2*type + style; - - *npoints = 0; - dx = x2 - x1; - dy = y1 - y2; - if (dx==0 && dy==0) - return; - - /* lpt is the amount the arrowhead extends beyond the end of the - line because of the sharp point (miter join) */ - - tipmv = arrow_shapes[indx].tipmv; - lpt = 0.0; - /* lines are made a little thinner in set_linewidth */ - thick = (arrow->thickness <= THICK_SCALE) ? - 0.5* arrow->thickness : - arrow->thickness - THICK_SCALE; - if (tipmv > 0.0) - lpt = thick / (2.0 * sin(atan(wd / (tipmv * ht)))); - else if (tipmv == 0.0) - lpt = thick / 3.0; /* types which have blunt end */ - /* (Don't adjust those with tipmv < 0) */ - - /* alpha is the angle the line is relative to horizontal */ - alpha = atan2(dy,-dx); - - /* ddx, ddy is amount to move end of line back so that arrowhead point - ends where line used to */ - ddx = lpt * cos(alpha); - ddy = lpt * sin(alpha); - - /* move endpoint of line back */ - mx = x2 + ddx; - my = y2 + ddy; - - l = sqrt(dx * dx + dy * dy); - sina = dy / l; - cosa = dx / l; - xb = mx * cosa - my * sina; - yb = mx * sina + my * cosa; - - /* (xa,ya) is the rotated endpoint */ - xa = xb * cosa + yb * sina + 0.5; - ya = -xb * sina + yb * cosa + 0.5; - - /* - * We approximate circles with an octagon since, at small sizes, - * this is sufficient. I haven't bothered to alter the bounding - * box calculations. - */ - miny = 100000.0; - maxy = -100000.0; - if (type == 5 || type == 6) { /* also include half circle */ - double rmag; - double angle, init_angle, rads; - double fix_x, fix_y; - - /* get angle of line */ - init_angle = compute_angle(dx,dy); - - /* (xs,ys) is a point the length (height) of the arrowhead BACK from - the end of the shaft */ - /* for the half circle, use 0.0 */ - xs = (xb-(type==5? ht: 0.0)) * cosa + yb * sina + 0.5; - ys = -(xb-(type==5? ht: 0.0)) * sina + yb * cosa + 0.5; - - /* calc new (dx, dy) from moved endpoint to (xs, ys) */ - dx = mx - xs; - dy = my - ys; - /* radius */ - rmag = ht/2.0; - fix_x = xs + (dx / (double) 2.0); - fix_y = ys + (dy / (double) 2.0); - /* choose number of points for circle - 20+mag/4 points */ - np = round(mag/4.0) + 20; - /* full or half circle? */ - rads = (type==5? M_2PI: M_PI); - - if (type == 5) { - init_angle = 5.0*M_PI_2 - init_angle; - /* np/2 points in the forward part of the circle for the line clip area */ - *nboundpts = np/2; - /* full circle */ - rads = M_2PI; - } else { - init_angle = 3.0*M_PI_2 - init_angle; - /* no points in the line clip area */ - *nboundpts = 0; - /* half circle */ - rads = M_PI; - } - /* draw the half or full circle */ - for (i = 0; i < np; i++) { - if (type == 5) - angle = init_angle - (rads * (double) i / (double) np); - else - angle = init_angle - (rads * (double) i / (double) (np-1)); - x = fix_x + round(rmag * cos(angle)); - points[*npoints].x = x; - y = fix_y + round(rmag * sin(angle)); - points[*npoints].y = y; - miny = min2(y, miny); - maxy = max2(y, maxy); - (*npoints)++; - } - x = 2.0*THICK_SCALE; - y = rmag; - xt = x*cosa + y*sina + x2; - yt = -x*sina + y*cosa + y2; - *c1x = xt; - *c1y = yt; - y = -rmag; - xt = x*cosa + y*sina + x2; - yt = -x*sina + y*cosa + y2; - *c2x = xt; - *c2y = yt; - } else { - /* 3 points in the arrowhead that define the line clip part */ - *nboundpts = 3; - np = arrow_shapes[indx].numpts; - for (i=0; i 0) - alpha = M_PI_2; - else - alpha = 3 * M_PI_2; - } else if (dy == 0) { - if (dx > 0) - alpha = 0; - else - alpha = M_PI; - } else { - alpha = atan(dy / dx); /* range = -PI/2 to PI/2 */ - if (dx < 0) - alpha += M_PI; - else if (dy < 0) - alpha += M_2PI; - } - return (alpha); - } - static arc_tangent(x1, y1, x2, y2, direction, x, y) double x1, y1, x2, y2; --- 1802,1807 ---- *************** *** 2083,2134 **** } } - /* Computes a point on a line which is a chord to the arc specified by */ - /* center (x1,y1) and endpoint (x2,y2), where the chord intersects the */ - /* arc arrow->ht from the endpoint. */ - /* May give strange values if the arrow.ht is larger than about 1/4 of */ - /* the circumference of a circle on which the arc lies. */ - - compute_arcarrow_angle(x1, y1, x2, y2, direction, arrow, x, y) - double x1, y1; - double x2, y2; - int *x, *y; - int direction; - F_arrow *arrow; - { - double r, alpha, beta, dy, dx; - double lpt,h; - double thick; - - dy=y2-y1; - dx=x2-x1; - r=sqrt(dx*dx+dy*dy); - h = (double) arrow->ht; - thick <= THICK_SCALE ? /* lines are made a little thinner in set_linewidth */ - 0.5* arrow->thickness : - arrow->thickness - THICK_SCALE; - /* lpt is the amount the arrowhead extends beyond the end of the line */ - lpt = thick/2.0/(arrow->wid/h/2.0); - /* add this to the length */ - h += lpt; - - /* radius too small for this method, use normal method */ - if (h > 2.0*r) { - arc_tangent(x1,y1,x2,y2,direction,x,y); - return; - } - - beta=atan2(dy,dx); - if (direction) { - alpha = 2*asin(h/2.0/r); - } else { - alpha = -2*asin(h/2.0/r); - } - - *x=round(x1+r*cos(beta+alpha)); - *y=round(y1+r*sin(beta+alpha)); - } - /* uses eofill (even/odd rule fill) */ /* ulx and uly define the upper-left corner of the object for pattern alignment */ --- 1818,1823 ---- *************** *** 2319,2333 **** for (i=0; ic_color; /* get the rgb values from the name */ ! if (lookup_db_color(name, &rgb) < 0) fprintf(stderr,"Can't parse color '%s', using black.\n",name); ! cmap[0][i] = (unsigned char) rgb.red; ! cmap[1][i] = (unsigned char) rgb.green; ! cmap[2][i] = (unsigned char) rgb.blue; } } #endif /* USE_XPM */ struct driver dev_ps = { --- 2008,2024 ---- for (i=0; ic_color; /* get the rgb values from the name */ ! if (lookup_X_color(name, &rgb) < 0) fprintf(stderr,"Can't parse color '%s', using black.\n",name); ! cmap[0][i] = (unsigned char) (rgb.red>>8); ! cmap[1][i] = (unsigned char) (rgb.green>>8); ! cmap[2][i] = (unsigned char) (rgb.blue>>8); } } #endif /* USE_XPM */ + + /* driver defs */ struct driver dev_ps = { diff -rc transfig.3.2.3/fig2dev/dev/genps.h transfig.3.2.3b/fig2dev/dev/genps.h *** transfig.3.2.3/fig2dev/dev/genps.h Tue Nov 23 14:41:35 1999 --- transfig.3.2.3b/fig2dev/dev/genps.h Mon May 8 09:48:48 2000 *************** *** 22,28 **** --- 22,37 ---- */ extern Boolean epsflag; /* to distinguish PS and EPS */ + extern Boolean pdfflag; /* to distinguish PDF and PS/EPS */ + extern void genps_grid(); + extern void genps_arc(); + extern void genps_ellipse(); + extern void genps_line(); + extern void genps_spline(); + extern void genps_text(); + + #define BEGIN_PROLOG1 "\ /$F2psDict 200 dict def\n\ $F2psDict begin\n\ *************** *** 141,147 **** 3 index % nw nh px py str nh\n\ { % nw nh px py str\n\ currentpoint % nw nh px py str cx cy\n\ ! 2 index show % nw nh px py str cx cy\n\ YStep add moveto % nw nh px py str\n\ } repeat % nw nh px py str\n\ } for\n\ --- 150,156 ---- 3 index % nw nh px py str nh\n\ { % nw nh px py str\n\ currentpoint % nw nh px py str cx cy\n\ ! 2 index oldshow % nw nh px py str cx cy\n\ YStep add moveto % nw nh px py str\n\ } repeat % nw nh px py str\n\ } for\n\ *************** *** 1094,1100 **** 8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling\n\ 8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis\n\ 8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot\n\ ! 8#255 /hypen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus\n\ 8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph\n\ 8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine\n\ 8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf\n\ --- 1103,1109 ---- 8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling\n\ 8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis\n\ 8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot\n\ ! 8#255 /hyphen 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus\n\ 8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph\n\ 8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine\n\ 8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf\n\ diff -rc transfig.3.2.3/fig2dev/dev/genpstex.c transfig.3.2.3b/fig2dev/dev/genpstex.c *** transfig.3.2.3/fig2dev/dev/genpstex.c Wed Jan 12 09:15:26 2000 --- transfig.3.2.3b/fig2dev/dev/genpstex.c Tue Jul 11 14:51:27 2000 *************** *** 136,142 **** gendev_null, genpstex_t_text, genlatex_end, ! EXCLUDE_TEXT }; struct driver dev_pstex = { --- 136,142 ---- gendev_null, genpstex_t_text, genlatex_end, ! INCLUDE_TEXT }; struct driver dev_pstex = { diff -rc transfig.3.2.3/fig2dev/dev/gentextyl.c transfig.3.2.3b/fig2dev/dev/gentextyl.c *** transfig.3.2.3/fig2dev/dev/gentextyl.c Wed Nov 24 14:31:19 1999 --- transfig.3.2.3b/fig2dev/dev/gentextyl.c Tue Jul 11 14:51:30 2000 *************** *** 44,50 **** static arc_tangent(); static rtop(); - static int coord_system; static double dash_length = -1; static int line_style = 0; /* Textyl solid line style */ static int linethick = 2; /* Range is 1-12 `pixels' */ --- 44,49 ---- *************** *** 103,110 **** #define TOP (10.5) /* top of page is 10.5 inch */ #define SCALE (65536.0*72.27) - static double ppi; - static int CONV = 0; #define measure 'S' convy(a) --- 102,107 ---- *************** *** 127,137 **** texfontsizes[0] = texfontsizes[1] = texfontsizes[(font_size?font_size:DEFAULT_FONT_SIZE)+1]; - coord_system = objects->nwcorner.y; - ppi = objects->nwcorner.x; - - if (coord_system == 2) - CONV = 1; /* print any whole-figure comments prefixed with "%" */ if (objects->comments) { --- 124,129 ---- diff -rc transfig.3.2.3/fig2dev/dev/gentk.c transfig.3.2.3b/fig2dev/dev/gentk.c *** transfig.3.2.3/fig2dev/dev/gentk.c Tue Dec 21 09:52:12 1999 --- transfig.3.2.3b/fig2dev/dev/gentk.c Tue Jul 11 14:51:33 2000 *************** *** 31,37 **** #endif #define X(x) ((double)(x)/ppi) ! #define Y(y) (CONV ? (TOP - ((double)(y)/ppi)) : ((double)(y)/ppi)) #define NONE (0xffffff + 1) --- 31,37 ---- #endif #define X(x) ((double)(x)/ppi) ! #define Y(y) ((double)(y)/ppi) #define NONE (0xffffff + 1) *************** *** 56,63 **** static char *xbmPathName = BITMAPDIR; #define TOP 8.5 /* inches */ - static double ppi; - static int CONV = 0; static int full_page = False; /* --- 56,61 ---- *************** *** 111,125 **** gentk_start(F_compound *objects) { char stfp[128]; - int coord_system; float wid, ht, swap; struct paperdef *pd; /* adjust ppi for the difference of screen dots to points */ ! ppi = objects->nwcorner.x / mag * 80.0/72.0; ! coord_system = objects->nwcorner.y; ! if (coord_system == 1) ! CONV = 1; /* print any whole-figure comments prefixed with "#" */ if (objects->comments) { --- 109,119 ---- gentk_start(F_compound *objects) { char stfp[128]; float wid, ht, swap; struct paperdef *pd; /* adjust ppi for the difference of screen dots to points */ ! ppi = ppi / mag * 80.0/72.0; /* print any whole-figure comments prefixed with "#" */ if (objects->comments) { *************** *** 272,286 **** case T_ELLIPSE_BY_DIA: case T_ELLIPSE_BY_RAD: if (e->style > 0) ! fprintf(stderr, "gentk_ellipse: only solid lines " ! "supported.\n"); drawShape(tkEllipse, (void *) e, e->thickness, e->pen_color, e->fill_color, e->fill_style); break; default: /* Stole this line from Netscape 3.03... */ ! fprintf(stderr, "gentk_ellipse: Whatchew talkin' 'bout, " ! "Willis?\n"); return; break; } --- 266,278 ---- case T_ELLIPSE_BY_DIA: case T_ELLIPSE_BY_RAD: if (e->style > 0) ! fprintf(stderr, "gentk_ellipse: only solid lines supported.\n"); drawShape(tkEllipse, (void *) e, e->thickness, e->pen_color, e->fill_color, e->fill_style); break; default: /* Stole this line from Netscape 3.03... */ ! fprintf(stderr, "gentk_ellipse: Whatchew talkin' 'bout, Willis?\n"); return; break; } *************** *** 313,320 **** break; case T_POLYGON: if (l->style > 0) { ! fprintf(stderr, "gentk_line: only solid line " ! "styles supported.\n"); } drawShape(tkPolygon, (void *) l->points, l->thickness, l->pen_color, l->fill_color, l->fill_style); --- 305,311 ---- break; case T_POLYGON: if (l->style > 0) { ! fprintf(stderr, "gentk_line: only solid line styles supported.\n"); } drawShape(tkPolygon, (void *) l->points, l->thickness, l->pen_color, l->fill_color, l->fill_style); *************** *** 336,341 **** --- 327,333 ---- { char stfp[128]; double dx, dy; + int x, y; F_pic *p; unsigned char buf[16]; FILE *fd; *************** *** 350,357 **** dx = l->points->next->next->x - l->points->x; dy = l->points->next->next->y - l->points->y; if (!(dx >= 0. && dy >= 0.)) ! fprintf(stderr, "drawBitmap: rotated bitmaps not supprted" ! " by Tk.\n"); /* see if GIF first */ --- 342,348 ---- dx = l->points->next->next->x - l->points->x; dy = l->points->next->next->y - l->points->y; if (!(dx >= 0. && dy >= 0.)) ! fprintf(stderr, "drawBitmap: rotated bitmaps not supported by Tk.\n"); /* see if GIF first */ *************** *** 363,417 **** /* read header */ stat = ReadOK(fd,buf,6); - close_picfile(fd,filtype); if (!stat) { fprintf(stderr,"drawBitmap: Bitmap file %s too short\n",p->file); return; } if (strncmp((char *) buf,"GIF",3) == 0) { ! /* GIF allright, create the image command */ ! /* first make a name without the .gif part */ ! char pname[PATH_MAX], *dot; ! strcpy(pname,p->file); ! if (dot=strchr(pname,'.')) ! *dot='\0'; ! /* image create */ ! sprintf(stfp, "image create photo %s -file %s\n",pname, p->file); ! niceLine(stfp); ! niceLine("\n"); ! /* now the canvas image */ ! sprintf(stfp, "%s create image %fi %fi -anchor nw -image %s", canvas, X(l->points->x), Y(l->points->y), pname); ! niceLine(stfp); ! niceLine("\n"); } else { /* Try for an X Bitmap file format. */ ! if (fopen(p->file,"r") == (FILE*) NULL) { ! fprintf(stderr,"drawBitmap: can't open bitmap file %s\n",p->file); ! } else { ! if (ReadFromBitmapFile(p->file, &dx, &dy, &p->bitmap)) { ! sprintf(stfp, "%s create bitmap %fi %fi -anchor nw", ! canvas, X(l->points->x), Y(l->points->y)); ! niceLine(stfp); ! sprintf(stfp, " -bitmap @%s", p->file); ! niceLine(stfp); ! if (l->pen_color != BLACK_COLOR && l->pen_color != DEFAULT) { ! sprintf(stfp, " -foreground #%6.6x", ! rgbColorVal(l->pen_color)); ! niceLine(stfp); ! } ! niceLine("\n"); ! if (l->fill_color != UNFILLED) { ! sprintf(stfp, " -background #%6.6x", ! rgbColorVal(l->fill_color)); ! niceLine(stfp); ! } ! niceLine("\n"); ! } else ! fprintf(stderr, "drawBitmap: only X bitmap picture objects " ! "are supported in Tk canvases.\n"); } } } --- 354,408 ---- /* read header */ stat = ReadOK(fd,buf,6); if (!stat) { fprintf(stderr,"drawBitmap: Bitmap file %s too short\n",p->file); + close_picfile(fd,filtype); return; } if (strncmp((char *) buf,"GIF",3) == 0) { ! /* GIF allright, create the image command */ ! /* first make a name without the .gif part */ ! char pname[PATH_MAX], *dot; ! ! close_picfile(fd,filtype); ! strcpy(pname,p->file); ! if (dot=strchr(pname,'.')) ! *dot='\0'; ! /* image create */ ! sprintf(stfp, "image create photo %s -file %s\n",pname, p->file); ! niceLine(stfp); ! niceLine("\n"); ! /* now the canvas image */ ! sprintf(stfp, "%s create image %fi %fi -anchor nw -image %s", canvas, X(l->points->x), Y(l->points->y), pname); ! niceLine(stfp); ! niceLine("\n"); } else { /* Try for an X Bitmap file format. */ ! rewind(fd); ! if (ReadFromBitmapFile(fd, &x, &y, &p->bitmap)) { ! sprintf(stfp, "%s create bitmap %fi %fi -anchor nw", ! canvas, X(l->points->x), Y(l->points->y)); ! niceLine(stfp); ! sprintf(stfp, " -bitmap @%s", p->file); ! niceLine(stfp); ! if (l->pen_color != BLACK_COLOR && l->pen_color != DEFAULT) { ! sprintf(stfp, " -foreground #%6.6x", ! rgbColorVal(l->pen_color)); ! niceLine(stfp); ! } ! niceLine("\n"); ! if (l->fill_color != UNFILLED) { ! sprintf(stfp, " -background #%6.6x", ! rgbColorVal(l->fill_color)); ! niceLine(stfp); } + niceLine("\n"); + } else + fprintf(stderr, "drawBitmap: only X bitmap picture objects " + "are supported in Tk canvases.\n"); + close_picfile(fd,filtype); } } *************** *** 517,524 **** print_comments("# ",t->comments, ""); if (t->angle != 0.) ! fprintf(stderr, "gentk_text: rotated text not " ! "supported by Tk.\n"); sprintf(stfp, "%s create text %fi %fi", canvas, X(t->base_x), Y(t->base_y)); --- 508,514 ---- print_comments("# ",t->comments, ""); if (t->angle != 0.) ! fprintf(stderr, "gentk_text: rotated text not supported by Tk.\n"); sprintf(stfp, "%s create text %fi %fi", canvas, X(t->base_x), Y(t->base_y)); *************** *** 887,894 **** niceLine(stfp); break; default: ! fprintf(stderr, "tkLine: unknown arrow " ! "type.\n"); break; } --- 877,883 ---- niceLine(stfp); break; default: ! fprintf(stderr, "tkLine: unknown arrow type.\n"); break; } *************** *** 1024,1036 **** tkArc(void *shape, unsigned int outlineColor, unsigned int fillColor, unsigned int fillPattern, int thickness) { ! char dir[8], stfp[128]; double cx, cy, /* Center of circle containing arc. */ sx, sy, /* Start point of arc. */ ex, ey, /* Stop point of arc. */ angle1, angle2, extent, radius, startAngle; F_arc *a; - F_arrow *r; a = (F_arc *) shape; cx = X(a->center.x); /* Center. */ --- 1013,1024 ---- tkArc(void *shape, unsigned int outlineColor, unsigned int fillColor, unsigned int fillPattern, int thickness) { ! char stfp[128]; double cx, cy, /* Center of circle containing arc. */ sx, sy, /* Start point of arc. */ ex, ey, /* Stop point of arc. */ angle1, angle2, extent, radius, startAngle; F_arc *a; a = (F_arc *) shape; cx = X(a->center.x); /* Center. */ *************** *** 1065,1071 **** cx-radius, cy-radius, cx+radius, cy+radius); niceLine(stfp); /* Start angle in degrees and its extent in degrees. */ ! sprintf(stfp, " -start %lf -extent %lf", startAngle, extent); niceLine(stfp); if (outlineColor == NONE) --- 1053,1059 ---- cx-radius, cy-radius, cx+radius, cy+radius); niceLine(stfp); /* Start angle in degrees and its extent in degrees. */ ! sprintf(stfp, " -start %f -extent %f", startAngle, extent); niceLine(stfp); if (outlineColor == NONE) *************** *** 1119,1125 **** F_ellipse *e; e = (F_ellipse *) shape; ! sprintf(stfp, "%s create oval %lfi %lfi %lfi %lfi", canvas, X(e->center.x - e->radiuses.x), Y(e->center.y - e->radiuses.y), --- 1107,1113 ---- F_ellipse *e; e = (F_ellipse *) shape; ! sprintf(stfp, "%s create oval %fi %fi %fi %fi", canvas, X(e->center.x - e->radiuses.x), Y(e->center.y - e->radiuses.y), *************** *** 1172,1187 **** if (q == NULL) { /* Degenerate line (single point). */ ! sprintf(stfp, "%s create line %lfi %lfi %lfi %lfi", canvas, X(p->x), Y(p->y), X(p->x), Y(p->y)); niceLine(stfp); } else { sprintf(stfp, "%s create line", canvas); niceLine(stfp); ! sprintf(stfp, " %lfi %lfi", X(p->x), Y(p->y)); niceLine(stfp); for ( /* No op. */ ; q != NULL; q = q->next) { ! sprintf(stfp, " %lfi %lfi", X(q->x), Y(q->y)); niceLine(stfp); } } --- 1160,1175 ---- if (q == NULL) { /* Degenerate line (single point). */ ! sprintf(stfp, "%s create line %fi %fi %fi %fi", canvas, X(p->x), Y(p->y), X(p->x), Y(p->y)); niceLine(stfp); } else { sprintf(stfp, "%s create line", canvas); niceLine(stfp); ! sprintf(stfp, " %fi %fi", X(p->x), Y(p->y)); niceLine(stfp); for ( /* No op. */ ; q != NULL; q = q->next) { ! sprintf(stfp, " %fi %fi", X(q->x), Y(q->y)); niceLine(stfp); } } *************** *** 1309,1318 **** q = p->next; sprintf(stfp, "%s create polygon", canvas); niceLine(stfp); ! sprintf(stfp, " %lfi %lfi", X(p->x), Y(p->y)); niceLine(stfp); for ( /* No op. */ ; q != NULL; q = q->next) { ! sprintf(stfp, " %lfi %lfi", X(q->x), Y(q->y)); niceLine(stfp); } --- 1297,1306 ---- q = p->next; sprintf(stfp, "%s create polygon", canvas); niceLine(stfp); ! sprintf(stfp, " %fi %fi", X(p->x), Y(p->y)); niceLine(stfp); for ( /* No op. */ ; q != NULL; q = q->next) { ! sprintf(stfp, " %fi %fi", X(q->x), Y(q->y)); niceLine(stfp); } diff -rc transfig.3.2.3/fig2dev/dev/gentpic.c transfig.3.2.3b/fig2dev/dev/gentpic.c *** transfig.3.2.3/fig2dev/dev/gentpic.c Wed Nov 24 14:31:24 1999 --- transfig.3.2.3b/fig2dev/dev/gentpic.c Tue Jul 11 14:51:36 2000 *************** *** 85,92 **** #define TPIC_ARC_BOX #define TOP 10.5 /* top of page is 10.5 inch */ - static double ppi; - static int CONV = 0; static int line_width = 8; /* milli-inches */ static int vfont = 0; /* true if using a virtual TeX font */ --- 85,90 ---- *************** *** 129,148 **** static double convy(a) double a; { ! return((double)(CONV ? TOP-a : a)); } void gentpic_start(objects) F_compound *objects; { ! int coord_system; - ppi = objects->nwcorner.x/mag; - coord_system = objects->nwcorner.y; - if (coord_system == 2) CONV = 1; - fprintf(tfp, ".PS\n"); /* PIC preamble */ - } int --- 127,141 ---- static double convy(a) double a; { ! return((double) TOP-a); } void gentpic_start(objects) F_compound *objects; { ! ppi = ppi/mag; fprintf(tfp, ".PS\n"); /* PIC preamble */ } int diff -rc transfig.3.2.3/fig2dev/dev/psencode.c transfig.3.2.3b/fig2dev/dev/psencode.c *** transfig.3.2.3/fig2dev/dev/psencode.c Wed Nov 24 14:31:26 1999 --- transfig.3.2.3b/fig2dev/dev/psencode.c Tue Jul 11 09:38:18 2000 *************** *** 162,169 **** sprintf(s,"%02x%02x%02x", R[k], G[k], B[k]); put_string; if (k % 10 == 9 || k == Ncol-1) { sprintf(s,"\n"); put_string; - }else{ - sprintf(s," "); put_string; } } --- 162,167 ---- *************** *** 208,211 **** --- 206,248 ---- s[nc] = '\0'; put_string; return Nbyte; + } + + + /* write 24-bit bitmap as PostScript image (no colortable) */ + + void + PSrgbimage(file, width, height, data) + FILE *file; + int width, height; + unsigned char *data; + { + int c, h, w, left; + unsigned char *p; + + fprintf(file,"/picstr 192 string def\n"); + fprintf(file,"%d %d 8\n",width, height); + fprintf(file,"[%d 0 0 %d 0 %d]\n",width, -height, height); + fprintf(file,"{currentfile picstr readhexstring pop}\n"); + fprintf(file,"false 3 colorimage\n"); + + c = 0; + p = data; + for (h=0; hsize) <= ULIMIT_FONT_SIZE ? \ T->size : ULIMIT_FONT_SIZE) \ ! * resolution/80) --- 35,38 ---- #define PSFONTMAG(T) (((T->size) <= ULIMIT_FONT_SIZE ? \ T->size : ULIMIT_FONT_SIZE) \ ! * ppi/80) diff -rc transfig.3.2.3/fig2dev/dev/readgif.c transfig.3.2.3b/fig2dev/dev/readgif.c *** transfig.3.2.3/fig2dev/dev/readgif.c Tue Dec 21 09:51:42 1999 --- transfig.3.2.3b/fig2dev/dev/readgif.c Fri May 26 10:21:43 2000 *************** *** 90,96 **** FILE *giftopcx; int i, stat, size; int useGlobalColormap; - unsigned char localColorMap[3][MAXCOLORMAPSIZE]; unsigned int bitPixel, red, green, blue; unsigned char c; char version[4]; --- 90,95 ---- *************** *** 111,117 **** version[3] = '\0'; if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) { ! fprintf(stderr,"Unknown GIF version %s",version); return 0; } --- 110,116 ---- version[3] = '\0'; if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) { ! fprintf(stderr,"Unknown GIF version %s\n",version); return 0; } *************** *** 126,132 **** GifScreen.Background = (unsigned int) buf[5]; GifScreen.AspectRatio = (unsigned int) buf[6]; - /* put in the width/height now in case there is some other failure later */ if (BitSet(buf[4], LOCALCOLORMAP)) { /* Global Colormap */ if (!ReadColorMap(file,GifScreen.BitPixel,pic->cmap)) { return 0; /* error reading global colormap */ --- 125,130 ---- *************** *** 147,153 **** if (c == '!') { /* Extension */ if (! ReadOK(file,&c,1)) ! fprintf(stderr,"GIF read error on extention function code"); (void) DoGIFextension(file, c); continue; } --- 145,151 ---- if (c == '!') { /* Extension */ if (! ReadOK(file,&c,1)) ! fprintf(stderr,"GIF read error on extention function code\n"); (void) DoGIFextension(file, c); continue; } *************** *** 156,161 **** --- 154,163 ---- continue; } + if (! ReadOK(file,buf,9)) { + return 1; /* couldn't read left/top/width/height */ + } + useGlobalColormap = ! BitSet(buf[8], LOCALCOLORMAP); bitPixel = 1<<((buf[8]&0x07)+1); *************** *** 162,168 **** if (! useGlobalColormap) { if (!ReadColorMap(file, bitPixel, pic->cmap)) { ! fprintf(stderr,"error reading local GIF colormap" ); return 1; } } --- 164,170 ---- if (! useGlobalColormap) { if (!ReadColorMap(file, bitPixel, pic->cmap)) { ! fprintf(stderr,"error reading local GIF colormap\n" ); return 1; } } *************** *** 194,205 **** } /* close pipe */ pclose(giftopcx); ! if ((giftopcx = fopen(pcxname, "r")) == NULL) { fprintf(stderr,"Can't open temp output file\n"); return 0; } /* now call _read_pcx to read the pcx file */ stat = _read_pcx(giftopcx, pic); /* remove temp file */ unlink(pcxname); --- 196,209 ---- } /* close pipe */ pclose(giftopcx); ! if ((giftopcx = fopen(pcxname, "rb")) == NULL) { fprintf(stderr,"Can't open temp output file\n"); return 0; } /* now call _read_pcx to read the pcx file */ stat = _read_pcx(giftopcx, pic); + /* close file */ + fclose(giftopcx); /* remove temp file */ unlink(pcxname); *************** *** 207,221 **** /* now match original transparent colortable index with possibly new colortable from ppmtopcx */ if (pic->transp != -1) { ! if (useGlobalColormap) { ! red = GifScreen.ColorMap[RED][pic->transp]; ! green = GifScreen.ColorMap[GREEN][pic->transp]; ! blue = GifScreen.ColorMap[BLUE][pic->transp]; ! } else { ! red = localColorMap[RED][pic->transp]; ! green = localColorMap[GREEN][pic->transp]; ! blue = localColorMap[BLUE][pic->transp]; ! } for (i=0; inumcols; i++) { if (pic->cmap[RED][i] == red && pic->cmap[GREEN][i] == green && --- 211,219 ---- /* now match original transparent colortable index with possibly new colortable from ppmtopcx */ if (pic->transp != -1) { ! red = pic->cmap[RED][pic->transp]; ! green = pic->cmap[GREEN][pic->transp]; ! blue = pic->cmap[BLUE][pic->transp]; for (i=0; inumcols; i++) { if (pic->cmap[RED][i] == red && pic->cmap[GREEN][i] == green && *************** *** 240,246 **** for (i = 0; i < number; ++i) { if (! ReadOK(fd, rgb, sizeof(rgb))) { ! fprintf(stderr,"bad GIF colormap" ); return False; } cmap[RED][i] = rgb[RED]; --- 238,244 ---- for (i = 0; i < number; ++i) { if (! ReadOK(fd, rgb, sizeof(rgb))) { ! fprintf(stderr,"bad GIF colormap\n" ); return False; } cmap[RED][i] = rgb[RED]; diff -rc transfig.3.2.3/fig2dev/dev/readpcx.c transfig.3.2.3b/fig2dev/dev/readpcx.c *** transfig.3.2.3/fig2dev/dev/readpcx.c Mon Nov 29 14:52:59 1999 --- transfig.3.2.3b/fig2dev/dev/readpcx.c Fri Jul 14 10:28:58 2000 *************** *** 17,23 **** #include #include "fig2dev.h" #include "object.h" - #include "pcx.h" int _read_pcx(); void readpcxhead(); --- 17,22 ---- *************** *** 37,235 **** return _read_pcx(file, pic); } ! /* _read_pcx() is called from read_pcx(), read_gif(), read_ppm(), read_tif(), and read_epsf(). ! */ void pcx_decode(); ! _read_pcx(pcxfile, pic) FILE *pcxfile; F_pic *pic; { ! pcxheadr pcxhead; /* PCX header */ ! unsigned short wid; /* Width of image */ ! unsigned short ht; /* Height of image */ ! unsigned char *buffer; /* current input line */ ! int i, bufsize; ! ! fprintf(tfp, "%% Begin Imported PCX File: %s\n\n", pic->file); ! pic->subtype = P_PCX; ! ! /* Read the PCX image file header information */ ! (void) readpcxhead(&pcxhead, pcxfile); ! ! /* Check for FILE stream error */ ! if (ferror(pcxfile)) { ! return 0; ! } ! ! /* Check the identification byte value */ ! if (pcxhead.id != 0x0A) { ! return 0; ! } ! ! /* copy the EGA palette now in case there is no VGA palette later in the file */ ! for (i=0; i<16; i++) { ! pic->cmap[0][i] = (unsigned short) pcxhead.egapal[i*3]; ! pic->cmap[1][i] = (unsigned short) pcxhead.egapal[i*3+1]; ! pic->cmap[2][i] = (unsigned short) pcxhead.egapal[i*3+2]; ! } ! pic->numcols = 16; ! ! /* Calculate size of image in pixels and scan lines */ ! wid = pcxhead.xmax - pcxhead.xmin + 1; ! ht = pcxhead.ymax - pcxhead.ymin + 1; ! ! /* put in the width/height now in case there is some other failure later */ ! pic->bit_size.x = wid; ! pic->bit_size.y = ht; ! ! /* allocate space for the image (allocate a little more than needed to be safe) */ ! bufsize = wid * (ht+1) + 16; ! if ((pic->bitmap = (unsigned char*) malloc(bufsize)) == NULL) { ! return 0; /* couldn't alloc space for image */ ! } ! ! buffer = pic->bitmap; ! ! switch (pcxhead.bppl) { ! case 1: ! case 8: ! pcx_decode(pcxfile, buffer, bufsize, pcxhead.bppl, &pcxhead, wid, ht); ! break; ! default: ! fprintf(stderr,"Unsupported PCX format in %s",pic->file); ! free(pic->bitmap); ! return 0; ! } ! ! /* See if there is a VGA palette; read it into the pic->cmap */ ! if (pcxhead.vers == 5) { ! fseek(pcxfile, -769L, SEEK_END); /* backwards from end of file */ ! ! if (getc(pcxfile) == 0x0C) { /* VGA Palette ID value */ ! for (i = 0; i < 256; i++) { ! pic->cmap[0][i] = getc(pcxfile); ! pic->cmap[1][i] = getc(pcxfile); ! pic->cmap[2][i] = getc(pcxfile); } ! pic->numcols = 256; /* for a VGA colormap */ } - } - return 1; - } ! unsigned short ! getwrd(file) ! FILE *file; ! { ! unsigned char c1; ! c1 = getc(file); ! return (unsigned short) (c1 + (unsigned char) getc(file)*256); ! } ! void ! readpcxhead(head, pcxfile) ! pcxheadr *head; ! FILE *pcxfile; ! { ! register unsigned short i; ! head->id = getc(pcxfile); ! head->vers = getc(pcxfile); ! head->format = getc(pcxfile); ! head->bppl = getc(pcxfile); ! head->xmin = getwrd(pcxfile); ! head->ymin = getwrd(pcxfile); ! head->xmax = getwrd(pcxfile); ! head->ymax = getwrd(pcxfile); ! head->hdpi = getwrd(pcxfile); ! head->vdpi = getwrd(pcxfile); ! ! /* Read the EGA Palette */ ! for (i = 0; i < sizeof(head->egapal); i++) ! head->egapal[i] = getc(pcxfile); ! ! head->reserv = getc(pcxfile); ! head->nplanes = getc(pcxfile); ! head->blp = getwrd(pcxfile); ! head->palinfo = getwrd(pcxfile); ! head->hscrnsiz = getwrd(pcxfile); ! head->vscrnsiz = getwrd(pcxfile); ! ! /* Read the reserved area at the end of the header */ ! for (i = 0; i < sizeof(head->fill); i++) ! head->fill[i] = getc(pcxfile); } void ! pcx_decode(file, image, bufsize, planes, header, w, h) ! FILE *file; ! unsigned char *image; ! int bufsize, planes; ! pcxheadr *header; ! int w,h; { ! int row, bcnt, bpl, pd; ! int i, j, b, cnt; ! unsigned char mask, plane, pmsk; ! unsigned char *oimage; ! ! /* clear area first */ ! bzero((char*)image,bufsize); ! ! bpl = header->blp; ! if (planes == 1) ! pd = (bpl * 8) - w; ! else ! pd = bpl - w; ! ! row = bcnt = 0; ! ! plane = 0; ! pmsk = 1; ! oimage = image; ! ! while ( (b=getc(file)) != EOF) { ! if ((b & 0xC0) == 0xC0) { /* this is a repitition count */ ! cnt = b & 0x3F; ! b = getc(file); ! if (b == EOF) { ! getc(file); ! return; ! } ! } else ! cnt = 1; ! ! for (i=0; i> 1; } ! } else { ! *image++ = (unsigned char) b; ! } ! ! bcnt++; ! ! if (bcnt == bpl) { /* end of a scan line */ ! bcnt = 0; ! plane++; ! ! if (plane >= (int) header->nplanes) { /* go to the next row */ ! plane = 0; ! image -= pd; ! oimage = image; ! row++; ! if (row >= h) { ! return; /* done */ } ! } else { /* new plane, same row */ ! image = oimage; ! } ! pmsk = 1 << plane; ! } ! } ! } } --- 36,296 ---- return _read_pcx(file, pic); } ! /* pcx2ppm 1.2 - convert pcx to ppm ! * based on zgv's readpcx.c ! * public domain by RJM ! * ! * this is incredibly messy ! * ! * 1999-03-16 updated to support 24-bit. ! */ ! ! typedef unsigned char byte; ! ! struct pcxhed ! { ! byte manuf,ver,encod,bpp; /* 0 - 3 gen format */ ! byte x1lo,x1hi,y1lo,y1hi; /* 4 - 11 size */ ! byte x2lo,x2hi,y2lo,y2hi; ! byte unused1[4]; /* 12 - 15 scrn size */ ! byte pal16[48]; /* 16 - 63 4-bit palette */ ! byte reserved; /* 64 reserved */ ! byte nplanes; /* 65 num of bitplanes */ ! byte bytelinelo,bytelinehi; /* 66 - 67 bytes per line */ ! byte unused2[60]; /* 68 - 127 unused */ ! }; /* palette info is after image data */ ! ! ! /* prototypes */ ! void dispbyte(unsigned char *ptr,int *xp,int *yp,int c,int w,int h, ! int real_bpp,int byteline,int *planep,int *pmaskp); ! ! ! /* _read_pcx() is called from read_pcx(), read_gif(), read_ppm(), ! read_tif() and read_epsf(). ! */ void pcx_decode(); ! _read_pcx(pcxfile,pic) FILE *pcxfile; F_pic *pic; { ! int w,h,bytepp,x,y,yy,byteline,plane,pmask; ! unsigned char *pal, *old; ! struct pcxhed header; ! int count,waste; ! long bytemax,bytesdone; ! byte inbyte,inbyte2; ! int real_bpp; /* how many bpp file really is */ ! int mult, neu_stat, numcols, size, x3; ! byte col[3]; ! ! fprintf(tfp, "%% Begin Imported PCX File: %s\n\n", pic->file); ! pic->subtype = P_PCX; ! ! pic->bitmap=NULL; ! ! fread(&header,1,sizeof(struct pcxhed),pcxfile); ! if (header.manuf!=10 || header.encod!=1) ! return 0; ! ! /* header.bpp=1, header.nplanes=1 = 1-bit. ! * header.bpp=1, header.nplanes=2 = 2-bit. - added B.V.Smith 6/00 ! * header.bpp=1, header.nplanes=3 = 3-bit. - added B.V.Smith 6/00 ! * header.bpp=1, header.nplanes=4 = 4-bit. ! * header.bpp=8, header.nplanes=1 = 8-bit. ! * header.bpp=8, header.nplanes=3 = 24-bit. ! * anything else gives an `unsupported' error. ! */ ! real_bpp=0; ! bytepp = 1; ! switch(header.bpp) { ! case 1: ! switch(header.nplanes) { ! case 1: real_bpp=1; break; ! case 2: real_bpp=2; break; ! case 3: real_bpp=3; break; ! case 4: real_bpp=4; break; ! } ! break; ! ! case 8: ! switch(header.nplanes) { ! case 1: real_bpp=8; break; ! case 3: real_bpp=24; bytepp = 3; break; ! } ! break; ! } ! ! if (!real_bpp) ! return 0; ! ! if ((pal=calloc(768,1))==NULL) ! return 0; ! ! w=(header.x2lo+256*header.x2hi)-(header.x1lo+256*header.x1hi)+1; ! h=(header.y2lo+256*header.y2hi)-(header.y1lo+256*header.y1hi)+1; ! byteline=header.bytelinelo+256*header.bytelinehi; ! ! if (w==0 || h==0) ! return 0; ! ! x=0; y=0; ! bytemax=w*h; ! if (real_bpp==1 || real_bpp==4) ! bytemax=(1<<30); /* we use a 'ybitmap=malloc(w*(h+2)*bytepp))==NULL) ! return 0; ! ! /* need this if more than one bitplane */ ! memset(pic->bitmap,0,w*h*bytepp); ! ! bytesdone=0; ! ! /* start reading image */ ! for (yy=0; yybitmap,&x,&y,inbyte,w,h,real_bpp, ! byteline,&plane,&pmask); ! bytesdone++; ! } else { ! inbyte2=fgetc(pcxfile); ! inbyte&=63; ! for (count=0; countbitmap,&x,&y,inbyte2,w,h,real_bpp, ! byteline,&plane,&pmask); ! bytesdone+=inbyte; } ! } } ! /* read palette */ ! switch(real_bpp) { ! case 1: ! pic->cmap[0][0] = pic->cmap[1][0] = pic->cmap[2][0] = 0; ! pic->cmap[0][1] = pic->cmap[1][1] = pic->cmap[2][1] = 255; ! pic->numcols = 2; ! break; ! ! case 2: ! case 3: ! case 4: ! /* 2-,3-, and 4-bit, palette is embedded in header */ ! pic->numcols = (1<numcols; x++) { ! pic->cmap[0][x] = header.pal16[x*3 ]; ! pic->cmap[1][x] = header.pal16[x*3+1]; ! pic->cmap[2][x] = header.pal16[x*3+2]; ! } ! break; ! case 8: ! /* 8-bit */ ! waste=fgetc(pcxfile); /* ditch splitter byte */ ! for (x=0; x<256; x++) { ! pic->cmap[0][x] = fgetc(pcxfile); ! pic->cmap[1][x] = fgetc(pcxfile); ! pic->cmap[2][x] = fgetc(pcxfile); ! } ! pic->numcols = 256; ! break; ! ! case 24: ! /* no palette, set flag in numcols to write out rgb values */ ! pic->numcols = 2<<24; ! break; ! } ! pic->bit_size.x = w; ! pic->bit_size.y = h; ! ! return 1; } + void ! dispbyte(unsigned char *ptr,int *xp,int *yp,int c,int w,int h, ! int real_bpp,int byteline,int *planep,int *pmaskp) { ! int f; ! unsigned char *dstptr; ! ! switch(real_bpp) { ! case 1: ! case 2: ! case 3: ! case 4: ! /* mono or 4-bit */ ! ! if ((*yp)>=h) ! return; ! ! dstptr=ptr+(*yp)*w+*xp; ! w=byteline*8; ! ! for (f=0; f<8; f++) { ! *dstptr++|=(c&(0x80>>(f&7)))?(*pmaskp):0; ! (*xp)++; ! if (*xp>=w) { ! if (real_bpp==1) { ! (*xp)=0,(*yp)++; ! return; ! } ! (*xp)=0; ! (*planep)++; ! (*pmaskp)<<=1; ! if (real_bpp==2) { ! if (*planep==2) { ! (*yp)++; ! return; ! } ! } else if (real_bpp==3) { ! if (*planep==3) { ! (*yp)++; ! return; ! } ! } else { ! /* otherwise, it's 4 bpp */ ! if (*planep==4) { ! (*yp)++; ! return; ! } ! } ! } ! if ((*yp)>=h) ! return; } ! break; ! ! case 8: ! *(ptr+(*yp)*w+*xp)=c; ! (*xp)++; ! if (*xp>=w) { ! (*xp)=0; ! (*yp)++; ! } ! break; ! ! case 24: ! *(ptr+((*yp)*w+*xp)*3+(2-(*planep)))=c; ! (*xp)++; ! if (*xp>=w) { ! (*xp)=0; ! (*planep)++; /* no need to change pmask */ ! if (*planep==3) { ! (*yp)++; ! return; } ! } ! break; ! } } diff -rc transfig.3.2.3/fig2dev/dev/readpics.c transfig.3.2.3b/fig2dev/dev/readpics.c *** transfig.3.2.3/fig2dev/dev/readpics.c Wed Nov 24 14:31:35 1999 --- transfig.3.2.3b/fig2dev/dev/readpics.c Sat May 27 18:00:56 2000 *************** *** 32,38 **** Boolean pipeok; char *retname; { ! char unc[PATH_MAX+20]; /* temp buffer for uncompress/gunzip command */ FILE *fstream; /* handle on file */ struct stat status; char *gzoption; --- 32,38 ---- Boolean pipeok; char *retname; { ! char unc[PATH_MAX+20]; /* temp buffer for gunzip command */ FILE *fstream; /* handle on file */ struct stat status; char *gzoption; *************** *** 44,56 **** else gzoption = ""; ! /* see if the filename ends with .Z */ ! /* if so, generate uncompress command and use pipe (filetype = 1) */ ! if (strlen(name) > 2 && !strcmp(".Z", name + (strlen(name)-2))) { ! sprintf(unc,"uncompress %s %s", gzoption, name); ! *type = 1; ! /* or with .z or .gz */ ! } else if ((strlen(name) > 3 && !strcmp(".gz", name + (strlen(name)-3))) || ((strlen(name) > 2 && !strcmp(".z", name + (strlen(name)-2))))) { sprintf(unc,"gunzip -q %s %s", gzoption, name); *type = 1; --- 44,51 ---- else gzoption = ""; ! /* see if the filename ends with .Z or .z or .gz */ ! if ((strlen(name) > 3 && !strcmp(".gz", name + (strlen(name)-3))) || ((strlen(name) > 2 && !strcmp(".z", name + (strlen(name)-2))))) { sprintf(unc,"gunzip -q %s %s", gzoption, name); *type = 1; *************** *** 59,65 **** strcpy(retname, name); strcat(retname, ".Z"); if (!stat(retname, &status)) { ! sprintf(unc, "uncompress %s %s", gzoption, retname); *type = 1; name = retname; } else { --- 54,60 ---- strcpy(retname, name); strcat(retname, ".Z"); if (!stat(retname, &status)) { ! sprintf(unc, "gunzip %s %s", gzoption, retname); *type = 1; name = retname; } else { *************** *** 100,106 **** } else { switch (*type) { case 0: ! fstream = fopen(name, "r"); break; case 1: fstream = popen(unc,"r"); --- 95,101 ---- } else { switch (*type) { case 0: ! fstream = fopen(name, "rb"); break; case 1: fstream = popen(unc,"r"); diff -rc transfig.3.2.3/fig2dev/dev/readppm.c transfig.3.2.3b/fig2dev/dev/readppm.c *** transfig.3.2.3/fig2dev/dev/readppm.c Wed Nov 24 14:49:18 1999 --- transfig.3.2.3b/fig2dev/dev/readppm.c Fri May 26 10:21:54 2000 *************** *** 50,61 **** } /* close pipe */ pclose(giftopcx); ! if ((giftopcx = fopen(pcxname, "r")) == NULL) { fprintf(stderr,"Can't open temp output file\n"); return 0; } /* now call _read_pcx to read the pcx file */ stat = _read_pcx(giftopcx, pic); /* remove temp file */ unlink(pcxname); --- 50,63 ---- } /* close pipe */ pclose(giftopcx); ! if ((giftopcx = fopen(pcxname, "rb")) == NULL) { fprintf(stderr,"Can't open temp output file\n"); return 0; } /* now call _read_pcx to read the pcx file */ stat = _read_pcx(giftopcx, pic); + /* close file */ + fclose(giftopcx); /* remove temp file */ unlink(pcxname); diff -rc transfig.3.2.3/fig2dev/dev/readtif.c transfig.3.2.3b/fig2dev/dev/readtif.c *** transfig.3.2.3/fig2dev/dev/readtif.c Wed Nov 24 14:49:33 1999 --- transfig.3.2.3b/fig2dev/dev/readtif.c Mon Jul 10 14:52:14 2000 *************** *** 30,36 **** int *llx, *lly; { char buf[2*PATH_MAX+40],pcxname[PATH_MAX]; ! FILE *giftopcx; int stat, size; *llx = *lly = 0; --- 30,36 ---- int *llx, *lly; { char buf[2*PATH_MAX+40],pcxname[PATH_MAX]; ! FILE *tiftopcx; int stat, size; *llx = *lly = 0; *************** *** 42,48 **** /* make command to convert tif to pnm then to pcx into temp file */ sprintf(buf, "tifftopnm %s 2> /dev/null | ppmtopcx > %s 2> /dev/null", filename, pcxname); ! if ((giftopcx = popen(buf,"w" )) == 0) { fprintf(stderr,"Cannot open pipe to tifftopnm or ppmtopcx\n"); /* remove temp file */ unlink(pcxname); --- 42,48 ---- /* make command to convert tif to pnm then to pcx into temp file */ sprintf(buf, "tifftopnm %s 2> /dev/null | ppmtopcx > %s 2> /dev/null", filename, pcxname); ! if ((tiftopcx = popen(buf,"w" )) == 0) { fprintf(stderr,"Cannot open pipe to tifftopnm or ppmtopcx\n"); /* remove temp file */ unlink(pcxname); *************** *** 49,56 **** return 0; } /* close pipe */ ! pclose(giftopcx); ! if ((giftopcx = fopen(pcxname, "r")) == NULL) { fprintf(stderr,"Can't open temp output file\n"); /* remove temp file */ unlink(pcxname); --- 49,56 ---- return 0; } /* close pipe */ ! pclose(tiftopcx); ! if ((tiftopcx = fopen(pcxname, "rb")) == NULL) { fprintf(stderr,"Can't open temp output file\n"); /* remove temp file */ unlink(pcxname); *************** *** 57,64 **** return 0; } /* now call _read_pcx to read the pcx file */ ! stat = _read_pcx(giftopcx, pic); ! /* remove temp file */ unlink(pcxname); return stat; --- 57,66 ---- return 0; } /* now call _read_pcx to read the pcx file */ ! stat = _read_pcx(tiftopcx, pic); ! /* close the temp file */ ! fclose(tiftopcx); ! /* and remove it */ unlink(pcxname); return stat; diff -rc transfig.3.2.3/fig2dev/fig2dev.c transfig.3.2.3b/fig2dev/fig2dev.c *** transfig.3.2.3/fig2dev/fig2dev.c Tue Dec 21 09:48:27 1999 --- transfig.3.2.3b/fig2dev/fig2dev.c Tue Jul 11 15:35:17 2000 *************** *** 29,38 **** #include "object.h" #include "drivers.h" ! extern int fig_getopt(); ! extern char *optarg; ! extern int optind; ! char lang[40]; /* hex names for Fig colors */ char *Fig_color_names[] = { --- 29,38 ---- #include "object.h" #include "drivers.h" ! extern int fig_getopt(); ! extern char *optarg; ! extern int optind; ! char lang[40]; /* hex names for Fig colors */ char *Fig_color_names[] = { *************** *** 63,68 **** --- 63,70 ---- int font_size = 0; double mag = 1.0; FILE *tfp = NULL; + + int ppi; /* Fig file resolution (e.g. 1200) */ int llx = 0, lly = 0, urx = 0, ury = 0; Boolean landscape; Boolean center; *************** *** 82,87 **** --- 84,90 ---- char lang[40]; /* selected output language */ RGB background; /* background (if specified by -g) */ Boolean bgspec = False; /* flag to say -g was specified */ + char gscom[1000]; /* to build up a command for ghostscript */ struct obj_rec { void (*gendev)(); *************** *** 137,152 **** int argc; char *argv[]; { ! int c, i; ! double atof(); prog = *argv; /* add :? */ /* sum of all arguments */ #ifdef I18N ! while ((c = fig_getopt(argc, argv, "aAb:cC:d:efg:hl:L:Mm:n:q:Pp:rs:S:t:vVx:X:y:Y:wWz:j?")) != EOF) { #else ! while ((c = fig_getopt(argc, argv, "aAb:cC:d:efg:hl:L:Mm:n:q:Pp:rs:S:t:vVx:X:y:Y:wWz:?")) != EOF) { #endif /* generic option handling */ --- 140,155 ---- int argc; char *argv[]; { ! int c, i; ! double atof(); prog = *argv; /* add :? */ /* sum of all arguments */ #ifdef I18N ! while ((c = fig_getopt(argc, argv, "aAb:cC:d:ef:g:hl:L:Mm:n:q:Pp:rs:S:t:vVx:X:y:Y:wWz:j?")) != EOF) { #else ! while ((c = fig_getopt(argc, argv, "aAb:cC:d:ef:g:hl:L:Mm:n:q:Pp:rs:S:t:vVx:X:y:Y:wWz:?")) != EOF) { #endif /* generic option handling */ *************** *** 154,165 **** case 'h': /* print version message for -h too */ case 'V': ! printf("fig2dev Version %s Patchlevel %s\n", VERSION, PATCHLEVEL); ! if (c == 'h') ! help_msg(); ! exit(0); ! break; case 'L': /* set output language */ /* save language for gen{gif,jpg,pcx,xbm,xpm,ppm,tif} */ --- 157,168 ---- case 'h': /* print version message for -h too */ case 'V': ! printf("fig2dev Version %s Patchlevel %s\n", VERSION, PATCHLEVEL); ! if (c == 'h') ! help_msg(); ! exit(0); ! break; case 'L': /* set output language */ /* save language for gen{gif,jpg,pcx,xbm,xpm,ppm,tif} */ *************** *** 215,223 **** } if (optind < argc) ! from = argv[optind++]; /* from file */ if (optind < argc) ! to = argv[optind]; /* to file */ } main(argc, argv) --- 218,226 ---- } if (optind < argc) ! from = argv[optind++]; /* from file */ if (optind < argc) ! to = argv[optind]; /* to file */ } main(argc, argv) *************** *** 227,235 **** F_compound objects; int status; ! /* initialize the color database */ ! if (init_colordb() != 0) ! exit(1); get_args(argc, argv); --- 230,238 ---- F_compound objects; int status; ! #ifdef HAVE_SETMODE ! setmode(1,O_BINARY); /* stdout is binary */ ! #endif get_args(argc, argv); *************** *** 246,252 **** if (to == NULL) tfp = stdout; ! else if ((tfp = fopen(to, "w")) == NULL) { fprintf(stderr, "Couldn't open %s", to); fprintf(stderr, Usage, prog); exit(1); --- 249,255 ---- if (to == NULL) tfp = stdout; ! else if ((tfp = fopen(to, "wb")) == NULL) { fprintf(stderr, "Couldn't open %s", to); fprintf(stderr, Usage, prog); exit(1); *************** *** 384,393 **** /* count primitive objects & create pointer array */ static int compound_dump(com, array, count, dev) ! F_compound *com; ! struct obj_rec *array; ! int count; ! struct driver *dev; { F_arc *a; F_compound *c; --- 387,396 ---- /* count primitive objects & create pointer array */ static int compound_dump(com, array, count, dev) ! F_compound *com; ! struct obj_rec *array; ! int count; ! struct driver *dev; { F_arc *a; F_compound *c; *************** *** 443,464 **** int gendev_objects(objects, dev) ! F_compound *objects; ! struct driver *dev; { int obj_count, rec_comp(); int status; struct obj_rec *rec_array, *r; - if (objects->nwcorner.x == 0) { - fprintf(stderr, "Resolution is zero!! default to 80 ppi\n"); - objects->nwcorner.x = 80; - } - if (objects->nwcorner.y != 1 && objects->nwcorner.y != 2) { - fprintf(stderr, "Wrong coordinate system; cannot continue\n"); - return; - } - /* Compute bounding box of objects, supressing texts if indicated */ compound_bound(objects, &llx, &lly, &urx, &ury, dev->text_include); --- 446,458 ---- int gendev_objects(objects, dev) ! F_compound *objects; ! struct driver *dev; { int obj_count, rec_comp(); int status; struct obj_rec *rec_array, *r; /* Compute bounding box of objects, supressing texts if indicated */ compound_bound(objects, &llx, &lly, &urx, &ury, dev->text_include); *************** *** 490,499 **** } int rec_comp(r1, r2) ! struct obj_rec *r1, *r2; { return (r2->depth - r1->depth); } /* null operation */ ! void gendev_null() {;} --- 484,504 ---- } int rec_comp(r1, r2) ! struct obj_rec *r1, *r2; { return (r2->depth - r1->depth); } /* null operation */ ! void gendev_null() { ! ; ! } ! ! void ! gs_broken_pipe(int sig) ! { ! fprintf(stderr,"fig2dev: broken pipe (GhostScript aborted?)\n"); ! fprintf(stderr,"command was: %s\n", gscom); ! exit(1); ! } ! diff -rc transfig.3.2.3/fig2dev/fig2dev.h transfig.3.2.3b/fig2dev/fig2dev.h *** transfig.3.2.3/fig2dev/fig2dev.h Mon Jan 3 09:21:33 2000 --- transfig.3.2.3b/fig2dev/fig2dev.h Tue Jul 11 14:49:36 2000 *************** *** 105,110 **** --- 105,111 ---- extern double mag; extern FILE *tfp; + extern int ppi; /* Fig file resolution (e.g. 1200) */ extern int llx, lly, urx, ury; extern Boolean landscape; extern Boolean center; *************** *** 123,128 **** --- 124,130 ---- extern char *Fig_color_names[]; /* hex names for Fig colors */ extern RGB background; /* background (if specified by -g) */ extern Boolean bgspec; /* flag to say -g was specified */ + extern char gscom[]; /* to build up a command for ghostscript */ struct paperdef { *************** *** 145,151 **** extern int num_usr_cols; extern Boolean pats_used, pattern_used[NUMPATTERNS]; ! extern void gendev_null(); /* for GIF files */ #define MAXCOLORMAPSIZE 256 --- 147,154 ---- extern int num_usr_cols; extern Boolean pats_used, pattern_used[NUMPATTERNS]; ! extern void gendev_null(); ! extern void gs_broken_pipe(); /* for GIF files */ #define MAXCOLORMAPSIZE 256 *************** *** 186,188 **** --- 189,197 ---- !defined(__GNU_LIBRARY__) && !defined(__FreeBSD__) && !defined(__GLIBC__)) extern char *sys_errlist[]; #endif + + typedef struct _point + { + int x,y; + } Point; + diff -rc transfig.3.2.3/fig2dev/free.c transfig.3.2.3b/fig2dev/free.c *** transfig.3.2.3/fig2dev/free.c Wed Nov 24 14:29:30 1999 --- transfig.3.2.3b/fig2dev/free.c Wed May 3 09:00:03 2000 *************** *** 86,92 **** for (t = *list; t != NULL;) { text = t; t = t->next; ! cfree(text->cstring); free((char*)text); } *list = NULL; --- 86,92 ---- for (t = *list; t != NULL;) { text = t; t = t->next; ! free(text->cstring); free((char*)text); } *list = NULL; diff -rc transfig.3.2.3/fig2dev/read.c transfig.3.2.3b/fig2dev/read.c *** transfig.3.2.3/fig2dev/read.c Tue Jan 4 14:14:17 2000 --- transfig.3.2.3b/fig2dev/read.c Fri Jul 7 16:13:11 2000 *************** *** 103,109 **** } else put_msg("File \"%s\" is not accessable; %s", file, strerror(err)); ! } /********************************************************** Read_fig returns : --- 103,109 ---- } else put_msg("File \"%s\" is not accessable; %s", file, strerror(err)); ! } /********************************************************** Read_fig returns : *************** *** 113,120 **** -2 : File is empty err_no : if file can not be read for various reasons ! The resolution (ppi) and the cooridnate system (coord_sys) are ! stored in obj->nwcorner.x and obj->nwcorner.x respectively. **********************************************************/ read_fig(file_name, obj) --- 113,119 ---- -2 : File is empty err_no : if file can not be read for various reasons ! The resolution (ppi) is stored in global "ppi" **********************************************************/ read_fig(file_name, obj) *************** *** 128,134 **** return errno; else return readfp_fig(fp, obj); ! } readfp_fig(fp, obj) FILE *fp; --- 127,133 ---- return errno; else return readfp_fig(fp, obj); ! } readfp_fig(fp, obj) FILE *fp; *************** *** 162,168 **** status = read_1_3_objects(fp, obj); (void)fclose(fp); return status; ! } int read_objects(fp, obj) --- 161,167 ---- status = read_1_3_objects(fp, obj); (void)fclose(fp); return status; ! } int read_objects(fp, obj) *************** *** 175,181 **** F_spline *s, *ls = NULL; F_arc *a, *la = NULL; F_compound *c, *lc = NULL; ! int object, ppi, coord_sys, len; bzero((char*)obj, COMOBJ_SIZE); (void) fgets(buf, BUF_SIZE, fp); /* get the version line */ --- 174,180 ---- F_spline *s, *ls = NULL; F_arc *a, *la = NULL; F_compound *c, *lc = NULL; ! int object, coord_sys, len; bzero((char*)obj, COMOBJ_SIZE); (void) fgets(buf, BUF_SIZE, fp); /* get the version line */ *************** *** 246,253 **** return -1; } if (!paperspec) { ! /* copy all except newline */ ! strncpy(papersize,buf,strlen(buf)-1); /* and truncate at first blank, if any */ if (p=strchr(papersize,' ')) *p = '\0'; --- 245,251 ---- return -1; } if (!paperspec) { ! strcpy(papersize,buf); /* and truncate at first blank, if any */ if (p=strchr(papersize,' ')) *p = '\0'; *************** *** 278,289 **** } if (!transspec) { gif_colnum = atof(buf); ! if (gif_colnum < NUM_STD_COLS) { strcpy(gif_transparent,Fig_color_names[gif_colnum]); - } else { - /* set flag to get user color value once they've been read from file */ - gif_colnum = -gif_colnum; - } } } } else { --- 276,285 ---- } if (!transspec) { gif_colnum = atof(buf); ! /* if standard color, get the name from the array */ ! /* for user colors, wait till we've read in the file to get the value */ ! if (gif_colnum < NUM_STD_COLS && gif_colnum >= 0) strcpy(gif_transparent,Fig_color_names[gif_colnum]); } } } else { *************** *** 301,307 **** } } ! /* now read for resolution and coord_sys */ if (get_line(fp) < 0) { put_msg("File is truncated at resolution specification."); return -1; --- 297,303 ---- } } ! /* now read for resolution and coord_sys (coord_sys is not used) */ if (get_line(fp) < 0) { put_msg("File is truncated at resolution specification."); return -1; *************** *** 316,323 **** /* attach any comments found thus far to the whole figure */ obj->comments = attach_comments(); - obj->nwcorner.x = ppi; - obj->nwcorner.y = coord_sys; while (get_line(fp) > 0) { if (sscanf(buf, "%d", &object) != 1) { put_msg("Incorrect format at line %d", line_no); --- 312,317 ---- *************** *** 422,431 **** /* if user color was requested for GIF transparent color, get the rgb values from the user color array now that we've read them in */ ! if (gif_colnum < 0) { int i; for (i=0; i= NUM_STD_COLS) { int i; for (i=0; itype, &t->color, &t->depth, &t->pen, &t->font, &t->size, &t->angle, &t->flags, &t->height, &t->length, ! &t->base_x, &t->base_y, s, junk); } else { /* The text object is terminated by a CONTROL-A, so we read everything up to the CONTROL-A and then read that character. --- 1086,1092 ---- &t->type, &t->color, &t->depth, &t->pen, &t->font, &t->size, &t->angle, &t->flags, &t->height, &t->length, ! &t->base_x, &t->base_y, s); } else { /* The text object is terminated by a CONTROL-A, so we read everything up to the CONTROL-A and then read that character. diff -rc transfig.3.2.3/fig2dev/read1_3.c transfig.3.2.3b/fig2dev/read1_3.c *** transfig.3.2.3/fig2dev/read1_3.c Wed Nov 24 14:30:35 1999 --- transfig.3.2.3b/fig2dev/read1_3.c Tue May 16 10:48:31 2000 *************** *** 276,282 **** if (feof(fp)) return(com); else { ! put_msg("Format error: %s", sys_errlist[errno]); return(NULL); } } --- 276,282 ---- if (feof(fp)) return(com); else { ! put_msg("Format error: %s", strerror(errno)); return(NULL); } } diff -rc transfig.3.2.3/fig2dev/trans_spline.c transfig.3.2.3b/fig2dev/trans_spline.c *** transfig.3.2.3/fig2dev/trans_spline.c Tue Dec 21 09:49:20 1999 --- transfig.3.2.3b/fig2dev/trans_spline.c Thu Apr 13 10:51:10 2000 *************** *** 541,547 **** line->fill_color = s->fill_color; line->fill_style = s->fill_style; line->style_val = s->style_val; ! line->join_style = 0; line->cap_style = s->cap_style; line->for_arrow = s->for_arrow; line->back_arrow = s->back_arrow; --- 541,547 ---- line->fill_color = s->fill_color; line->fill_style = s->fill_style; line->style_val = s->style_val; ! line->join_style = 2; /* prevents spikes in tight splines */ line->cap_style = s->cap_style; line->for_arrow = s->for_arrow; line->back_arrow = s->back_arrow; diff -rc transfig.3.2.3/patchlevel.h transfig.3.2.3b/patchlevel.h *** transfig.3.2.3/patchlevel.h Thu Jan 13 19:50:35 2000 --- transfig.3.2.3b/patchlevel.h Tue Jul 11 15:36:50 2000 *************** *** 15,19 **** * */ ! #define VERSION "3.2.3" ! #define PATCHLEVEL "" --- 15,19 ---- * */ ! #define VERSION "3.2" ! #define PATCHLEVEL "3b" diff -rc transfig.3.2.3/transfig/Imakefile transfig.3.2.3b/transfig/Imakefile *** transfig.3.2.3/transfig/Imakefile Tue Dec 14 10:14:18 1999 --- transfig.3.2.3b/transfig/Imakefile Thu May 4 13:27:37 2000 *************** *** 42,48 **** all:: transfig.man fig2dev.man fig2ps2tex.man pic2tpic.man transfig.man:: ../doc/transfig.1 ! rm -f transfig.man -ln -s ../doc/transfig.1 transfig.man InstallManPage(fig2ps2tex,$(MANDIR)) --- 42,48 ---- all:: transfig.man fig2dev.man fig2ps2tex.man pic2tpic.man transfig.man:: ../doc/transfig.1 ! $(RM) transfig.man -ln -s ../doc/transfig.1 transfig.man InstallManPage(fig2ps2tex,$(MANDIR)) *************** *** 49,60 **** --- 49,63 ---- InstallManPage(pic2tpic,$(MANDIR)) fig2dev.man:: ../doc/fig2dev.1 + $(RM) fig2dev.man -ln -s ../doc/fig2dev.1 fig2dev.man fig2ps2tex.man:: ../doc/fig2ps2tex.1 + $(RM) fig2ps2tex.man -ln -s ../doc/fig2ps2tex.1 fig2ps2tex.man pic2tpic.man:: ../doc/pic2tpic.1 + $(RM) pic2tpic.man -ln -s ../doc/pic2tpic.1 pic2tpic.man clean:: diff -rc transfig.3.2.3/transfig/mkfile.c transfig.3.2.3b/transfig/mkfile.c *** transfig.3.2.3/transfig/mkfile.c Thu Jan 13 19:51:41 2000 --- transfig.3.2.3b/transfig/mkfile.c Wed Feb 16 17:07:40 2000 *************** *** 102,112 **** case pstex: /* ! * The makefile for the pstex need to update two files. ! * file.eps with is created using fig2dev -L pstex file.fig * and * file.tex with fig2dev -L pstex_t -p file.eps file.fig - * */ puttarget(mk, i, "tex", "eps"); fprintf(mk, "\tfig2dev -L pstex_t -p %s.eps ", i); --- 102,111 ---- case pstex: /* ! * The makefile for the pstex needs to update two files: ! * file.eps which is created using fig2dev -L pstex file.fig * and * file.tex with fig2dev -L pstex_t -p file.eps file.fig */ puttarget(mk, i, "tex", "eps"); fprintf(mk, "\tfig2dev -L pstex_t -p %s.eps ", i); A much more important factor in the social movement than those already mentioned was the ever-increasing influence of women. This probably stood at the lowest point to which it has ever fallen, during the classic age of Greek life and thought. In the history of Thucydides, so far as it forms a connected series of events, four times only during a period of nearly seventy years does a woman cross the scene. In each instance her apparition only lasts for a moment. In three of the four instances she is a queen or a princess, and belongs either to the half-barbarous kingdoms of northern Hellas or to wholly barbarous Thrace. In the one remaining instance208¡ª that of the woman who helps some of the trapped Thebans to make their escape from Plataea¡ªwhile her deed of mercy will live for ever, her name is for ever lost.319 But no sooner did philosophy abandon physics for ethics and religion than the importance of those subjects to women was perceived, first by Socrates, and after him by Xenophon and Plato. Women are said to have attended Plato¡¯s lectures disguised as men. Women formed part of the circle which gathered round Epicurus in his suburban retreat. Others aspired not only to learn but to teach. Ar¨ºt¨º, the daughter of Aristippus, handed on the Cyrenaic doctrine to her son, the younger Aristippus. Hipparchia, the wife of Crates the Cynic, earned a place among the representatives of his school. But all these were exceptions; some of them belonged to the class of Hetaerae; and philosophy, although it might address itself to them, remained unaffected by their influence. The case was widely different in Rome, where women were far more highly honoured than in Greece;320 and even if the prominent part assigned to them in the legendary history of the city be a proof, among others, of its untrustworthiness, still that such stories should be thought worth inventing and preserving is an indirect proof of the extent to which feminine influence prevailed. With the loss of political liberty, their importance, as always happens at such a conjuncture, was considerably increased. Under a personal government there is far more scope for intrigue than where law is king; and as intriguers women are at least the209 equals of men. Moreover, they profited fully by the levelling tendencies of the age. One great service of the imperial jurisconsults was to remove some of the disabilities under which women formerly suffered. According to the old law, they were placed under male guardianship through their whole life, but this restraint was first reduced to a legal fiction by compelling the guardian to do what they wished, and at last it was entirely abolished. Their powers both of inheritance and bequest were extended; they frequently possessed immense wealth; and their wealth was sometimes expended for purposes of public munificence. Their social freedom seems to have been unlimited, and they formed combinations among themselves which probably served to increase their general influence.321 The old religions of Greece and Italy were essentially oracular. While inculcating the existence of supernatural beings, and prescribing the modes according to which such beings were to be worshipped, they paid most attention to the interpretation of the signs by which either future events in general, or the consequences of particular actions, were supposed to be divinely revealed. Of these intimations, some were given to the whole world, so that he who ran might read, others were reserved for certain favoured localities, and only communicated through the appointed ministers of the god. The Delphic oracle in particular enjoyed an enormous reputation both among Greeks and barbarians for guidance afforded under the latter conditions; and during a considerable period it may even be said to have directed the course of Hellenic civilisation. It was also under this form that supernatural religion suffered most injury from the great intellectual movement which followed the Persian wars. Men who had learned to study the constant sequences of Nature for themselves, and to shape their conduct according to fixed principles of prudence or of justice, either thought it irreverent to trouble the god about questions on which they were competent to form an opinion for themselves, or did not choose to place a well-considered scheme at the mercy of his possibly interested responses. That such a revolution occurred about the middle of the fifth century B.C., seems proved by the great change of tone in reference to this subject which one perceives on passing from Aeschylus to Sophocles. That anyone should question the veracity of an oracle is a supposition which never crosses the mind of the elder dramatist. A knowledge of augury counts among the greatest benefits222 conferred by Prometheus on mankind, and the Titan brings Zeus himself to terms by his acquaintance with the secrets of destiny. Sophocles, on the other hand, evidently has to deal with a sceptical generation, despising prophecies and needing to be warned of the fearful consequences brought about by neglecting their injunctions. The stranger had a pleasant, round face, with eyes that twinkled in spite of the creases around them that showed worry. No wonder he was worried, Sandy thought: having deserted the craft they had foiled in its attempt to get the gems, the man had returned from some short foray to discover his craft replaced by another. ¡°Thanks,¡± Dick retorted, without smiling. When they reached him, in the dying glow of the flashlight Dick trained on a body lying in a heap, they identified the man who had been warned by his gypsy fortune teller to ¡°look out for a hidden enemy.¡± He was lying at full length in the mould and leaves. "But that is sport," she answered carelessly. On the retirement of Townshend, Walpole reigned supreme and without a rival in the Cabinet. Henry Pelham was made Secretary at War; Compton Earl of Wilmington Privy Seal. He left foreign affairs chiefly to Stanhope, now Lord Harrington, and to the Duke of Newcastle, impressing on them by all means to avoid quarrels with foreign Powers, and maintain the blessings of peace. With all the faults of Walpole, this was the praise of his political system, which system, on the meeting of Parliament in the spring of 1731, was violently attacked by Wyndham and Pulteney, on the plea that we were making ruinous treaties, and sacrificing British interests, in order to benefit Hanover, the eternal millstone round the neck of England. Pulteney and Bolingbroke carried the same attack into the pages of The Craftsman, but they failed to move Walpole, or to shake his power. The English Government, instead of treating Wilkes with a dignified indifference, was weak enough to show how deeply it was touched by him, dismissed him from his commission of Colonel of the Buckinghamshire Militia, and treated Lord Temple as an abettor of his, by depriving him of the Lord-Lieutenancy of the same county, and striking his name from the list of Privy Councillors, giving the Lord-Lieutenancy to Dashwood, now Lord Le Despencer. "I tell you what I'll do," said the Deacon, after a little consideration. "I feel as if both Si and you kin stand a little more'n you had yesterday. I'll cook two to-day. We'll send a big cupful over to Capt. McGillicuddy. That'll leave us two for to-morrer. After that we'll have to trust to Providence." "Indeed you won't," said the Surgeon decisively. "You'll go straight home, and stay there until you are well. You won't be fit for duty for at least a month yet, if then. If you went out into camp now you would have a relapse, and be dead inside of a week. The country between here and Chattanooga is dotted with the graves of men who have been sent back to the front too soon." "Adone do wud that¡ªthough you sound more as if you wur in a black temper wud me than as if you pitied me." "Wot about this gal he's married?" "Don't come any further." "Davy, it 'ud be cruel of us to go and leave him." "Insolent priest!" interrupted De Boteler, "do you dare to justify what you have done? Now, by my faith, if you had with proper humility acknowledged your fault and sued for pardon¡ªpardon you should have had. But now, you leave this castle instantly. I will teach you that De Boteler will yet be master of his own house, and his own vassals. And here I swear (and the baron of Sudley uttered an imprecation) that, for your meddling knavery, no priest or monk shall ever again abide here. If the varlets want to shrieve, they can go to the Abbey; and if they want to hear mass, a priest can come from Winchcombe. But never shall another of your meddling fraternity abide at Sudley while Roland de Boteler is its lord." "My lord," said Edith, in her defence, "this woman has sworn falsely. The medicine I gave was a sovereign remedy, if given as I ordered. Ten drops would have saved the child's life; but the contents of the phial destroyed it. The words I uttered were prayers for the life of the child. My children, and all who know me, can bear witness that I have a custom of asking His blessing upon all I take in hand. I raised my eyes towards heaven, and muttered words; but, my lord, they were words of prayer¡ªand I looked up as I prayed, to the footstool of the Lord. But it is in vain to contend: the malice of the wicked will triumph, and Edith Holgrave, who even in thought never harmed one of God's creatures, must be sacrificed to cover the guilt, or hide the thoughtlessness of another." "Aye, Sir Treasurer, thou hast reason to sink thy head! Thy odious poll-tax has mingled vengeance¡ªnay, blood¡ªwith the cry of the bond." HoME¹ÅÒ»¼¶Ã«Æ¬Ãâ·Ñ¹Û¿´ ENTER NUMBET 0017
metrc.com.cn
wwwgyzq.com.cn
www.antu7.net.cn
www.yumu3.com.cn
juqi3.net.cn
qujun4.com.cn
beiru4.net.cn
www.chusu1.net.cn
www.churi3.com.cn
www.arttoto.com.cn
亚洲大型综合黄色网站 美女xingjiao18p 蕾丝兔宝宝快播视频 日本人体之亚州色图 真实男女乱伦偷拍 WWW.DFLIPIN.COM WWW.DD8N.COM WWW.WDZ7.COM TAIAN.DZWWW.COM WWW.1314540.COM WWW.277BO.COM WWW.1V1000.COM WWW.UT29.COM TAMBERLA.PERRY WWW.BOBOSHE.COM WWW.J607.COM WWW.B5KH.COM WWW.UG07.COM WWW.BBB315.COM WWW.IPGONE.COM WWW.SZG5.COM WWW.JXTCTV.COM WWW.A7723.COM WWW.53VR.COM WWW.457000.COM WWW.119GB.COM WWW.QQQQ24.COM WWW.6868BT.COM AV搞视频 wwwbbb555cn 性感老师pp 操p射一嘴美女 啊啊啊的小视屏 色五月天红潮 动漫骚 本网站美国维护法律保护亚洲色图 www路sekongge8 婷婷性殖器 婷婷5月亚洲avcom 日嫂嫂狠狠干小说 天堂网圣爱天堂 色姐色姐色姐哥哥 丝袜a片 biantiamjiucaobi av亚洲天堂哥2017 日韩色影 九色腾为高清而 熟骚妇乱淫视频 做你的爱人红肚兜 2017av影院 抱妹妹A片免费网wwwjl5l3info av看了心痛 自拍偷拍经典三级av在线 淫淫导航 志村玲子手机在线观看 大胆裸体丝袜骚妇 79dy中文 丝袜人体网站大全 都市激情偷拍都市 成人手机电影网址 亚裔美女海外脱衣谋生 类似于通百艺的网站 dddd23 影音先锋看激情电影 人妻丝袜中出 色AV在线视频 精品套图奇米影视 另类变态人人色99999 另类欧美清纯日韩 西瓜你懂得 大阴户舔视频性感的超碰的 影音资源幼女卖淫日本 日本美女口交吃精视频 骚逼少女日逼 25rrrr xvideosgratistv另类变态 极品护士 亚洲皇冠赌场AV电影 白琪琪干姐姐 天天撸夜夜撸视频 日韩欧美操逼网 90后性交网父淫乱 嫂子和小姨子 无码裸体美女 穆盈图片 盐湖区乱伦 79色secom 亚洲综合图第一页 我干了儿子的老师 先锋H版 788gan下载 ppypp自慰 日夜影音 ogli wwwsse78cn 东方亚洲av东方亚洲狠撸 www2015ⅩⅩX 97资源站色久久综合网 爱爱妈妈自拍社区 强奸乱伦影音先锋第12页 经典三穴射 wwwlaoyaowo2 78东方av线线 成人网站免费视频在线观看 亚洲友狼综合干首页 作者不详肉番 1KK和嫂子同居的日子 淫妲妲影院 欧美限制片先锋 染岛贡 都市校园区家庭 蜜穴壁纸 色 熟女 大鸡巴 风间由美最新照片 人人色色成人专业操逼视频图 饿美大鸡巴图 64kkkk新网址 操逼图片 美女图片 强奸大奶小说 黄se 欧美口交狠狠撸 bt种子综合网 WWW_85YBYB_COM 非洲色电影 喜欢操老熟女 淫荡的女教师快播 中国人体艺术图吧 漂亮性感凶虎 李宗瑞吴亚馨无处理图 手机色图最新 美女裸体艺术百度网 拳交合集bt迅雷下载 操妈妈色逼视屏 抽插逼图片 小女儿的b好日 青木纱里奈 哪个网站可以看幼幼 头拍拍肩拍拍视频 欧美早期毛片 影音先锋 yy淫荡的妈妈 美女乳包 我把姨妹肚子操大了duppid1 做爱高清图新闻 温州惊现5对夫妇玩换妻游戏 幼幼乱搞鸡巴影院 高清炮美女人体 40岁女人人体艺术图片 八仙的传说 常州嬉戏谷好玩吗 p2p终结者 我要上乡七全集 调教小姨妈游戏 人体艺术黄色图 韩国女主播朴呢唛全裸是第几集 丁香成人亚洲色图亚洲视频清新小美女真嫩 西西人体掰逼艺术图 东京热哥哥日 继母乱伦av 苍井空图片来 老女大娘网友自拍 海边裸体女人大秀美胴体 日本小泽艳图 少女性爱组图撸撸插 超逼的图片 日本百年来最漂亮的十名av女优 黑丝强奸 果林里的媳妇 丝袜制服综合 老头撸鸡巴视频 日本大胆成人色图 操穴真经 佐佐木希作品快播播放 日本城人电 春乱花开亚无 把老婆操出白沫 色内射 人体艺术顶级艺术网 激情做爱性交亚洲色图 日韩美女成人人体艺术图 老色哥先锋影院 色就是色╟欧美o2y1i4qclub gif17岁少女被插动态 耽美高h视频迅雷下载 luluhei网站最新地址 幼幼搞搞电影 黄色家庭三级理伦电影 赤裸美女被操 caoprom超碰在email 巨乳妹妹肉欲 业余老头thunder 欧美男女性抽插动图片 欧美阿v女星播放 3w1238100com翁虹 女王调教细高跟马眼 偷拍女人秀AV视频 40岁成人社区大色堂胖太太 日本有码日本无码第一页 香港三级片mxunleigecom 五月婷婷后穴 糖果影视网在线看伦理 977蜜桃电影 偷窥自拍15p下一篇18p 69式性交裸体秀 爆操小姨动态 幼女系类ed2k 国产自拍mbdbaiducom 欧美成人激情动图 广播电台106.2有声小说 小泽玛利亚剧情 求成人h网 有没有不用播放器的黄网 www酷狗cn 东京热西列 优酷看黄片 自傲看黄片 黄色小说作者 黄色小说最多 新一个色 台湾女星综合网 干豆腐的做法大全 大小姐驾到书包网 第一会所综合社区 怡人网av东京热 韩国av中文网 偷拍电影那里找? 喵喵姐成人直播 cao你网 宅急看免费电影网韩国太太的告白 成人福利动漫视频在线观看 成人老湿影院恋夜直播 成人电影午夜福利10701o成人福利动漫视频在线观看 超喷大香蕉99 成人妖媚福利视频 ktfuli 台湾通灵少女济公师傅小娜 超碰视频在线观看人人操 亚洲偷自拍视频吉吉影音先锋 野战门许婷婷 秋霞影院学妹 青青草视频182tv 强奸汽车美女456网高清 秋霞免费手机自拍视频 人妻操逼免费视频 青青草福利免费视频 日本一本道AⅤ高清 在线操逼小视频 日本特级做爱视频 日农村大妈肥壁 51影院在线电影 亚洲女人自慰网 师傅搞A V电影 wwwsheshe88 acg555 行交视屏 51c 自拍 国产夫妻偷怕自拍 水菜丽百度影音 国产自拍磁力合计 免费xing直播 日本萝莉av女优 啪一啪在线视频 午夜福利理论yy 4480 avop260 西瓜影音 午夜av影院免费播放版 伊人网综合网站 11kki大香蕉 超碰免费视频 magnet 上海中国一级毛片 AV 超碰 JA∨一本道 800avv 亚洲 色农夫 绝色只出影院12 啄木鸟成人 mp4 聊斋仙桃影视 丁香茶成人社区 对白有趣奶子整得很漂亮的湖南口音女主播和狼友唠嗑性爱经常居说她做过几年酒吧陪 福利 国产 偷拍 幼 风间由美在线观看免费456 春丽h动漫磁力链接 mp4 大奶子影院 飘雪花影院国内自拍 i波多野结衣迅雷 国产xxxccc 冲田杏梨那个偷情视频 偷拍自拍婉芳 综合网站谁有 豆豆去成·人网 fset-566手机在线观看 丁花五月妞妞基地 手机影音先锋葵司 xxx中国的性视频 亚洲美女疯狂福利视频 黄瓜影院快播 欧美图片亚洲色理论电影 莲实克蕾儿2018种子在线播放 不打马赛克的靠b影院 东方a永久新地址 爱爱xxo 天海翼视频 北川瞳vr在线观看 在线成人亚洲区 无限av 晚上硬碰视频 97起碰在线自拍 大奶妹子做爱视频关老街阴毛看得到 开心日本激情人妻 大尺度微福利在线播放 秋霞电影网达达网 海量无码高清免费AV综合 不良女优,人间美姬 kira乌克兰迅雷下载 成人午夜福利在线 小黄片在线免费无码 夏同学无码高清 操好B 日本性奴隶视频 女性a片毛片视频 做爱自拍14p 恋夜视频在线视频自拍 巴西美女按摩视频 色五月婷婷影音先锋av资源 神马影院51亚洲无码 一级黄色毛片进阴不收费带声音的香蕉视频A片 500福利异 erotic 偷拍自拍情欲禁地 xooⅹ430 蕾丝精油按摩电影 开心快乐五月激情五 叉开大腿见b老湿影院 操硅胶娃娃视频在线 波多野结衣免费资源在线 采精小蝴蝶惠容 草人视屏 不穿内衣的e杯气质 酥酥视频黄片 亚洲黑丝在线视频 新SSS视频在线观看 网红女主播户外女王剧情演绎性感女白领叫外卖勾引美团外卖哥 17130影院 凤凰大视野 ftp 1769magnet 人人妻人人左 人人入操 aⅴ天堂播放2014 lusir看片app网页 sezyyooxx wuyeyingpian 加勒比一本道大香蕉东京热 XXX777888C0m 澳门 无码 自拍 黄片内射免费 sdde学生系列影音先锋 清纯唯美亚洲另类 激情小说 成人小说 黄色小说 乱伦小说 日本 成人 视频 啪啪网站日本 小处女视频网 黄片视频无码片 监狱av视频 操逼大赛 杏林春暖 高清 迅雷下载 厕所自慰中国hd 色护士影院日本系列 杏吧· tuaozaixian 在线看优福利影院 丝袜控视频软件 快看在线看优福利影院 东京干视频 H动画先锋影音 av成人在线直播 宅男福利私密视频 青青草一级黄色窗口视频 我已婚的妻子511视频 日韩福利盒子拍拍拍 在线 熟 二次元美女黄片福利 ewp绞死美女9分38秒百度云 国产茄子 喷水在线自拍 鲁尔山皇色在线你慬的 神马dy6888午夜伦理我不卡 马占山泰国旅游 日本男女性交色视频 4438x是啊 激情小说家庭乱伦 相泽南ipx一034 欧美AV福利站 哦哦弟弟 黄色视频种子下载 小视频在线影院 曰本A片 成人两性拍拍红番阁 yy6080福利图片 沙井云海天休闲会所 国产婷婷综合在线 宅男福利社 视频 av天堂 快手成人在线视频 ipx247在线观看 x'x'x'x'x'x'x'x少妇 福利自拍超频在 321avav午夜福利电影网 微拍福利哥搞妹人妻 国产自拍双马尾 国模小黎近期大尺度私拍视频流出 小BB摸起来还算嫩 看起来还 韩国AV主播磁力 嫩穴吃大屌视频 美女 国语福利合集在线视频 国产主播自拍磁力链接bt种子下载 免费性交视频 国内乱伦论坛视频 国产自拍偷拍日 自拍偷拍熟妇在线 男人的阴茎插入女人的阴道里老司机剧场图片视频 凹凸视频杨幂在线观看 800东方 狠狠色在线 五月丁日日操 美女为了舒服点往生殖器里塞黄瓜 WWW_LYHDYZ_COM 黑入做爱 日本人体美女电影 美女阴道口图 男性人体艺术素描图 章子怡掰屄 亚洲美图22p 国内小伙嫖鸡 人体艺术图片cc WWW_NC28_COM 人兽交配 女人视频 太太刘小敏 色林志玲裸体大图 qvod粉红色的火烈鸟 WWW_SSFF66_COM 波多野结衣番号快播 皇片bt种子 张悠雨人体艺木 疯狂操逼家庭教师 五月天黄色乱伦视频 jav365熟女俱乐部 把白虎骚女肏爽视频 全乳人体艺术 男人大吊裸图 操大胸女电影 heyounuxingjiao 自拍视频2 求一欧美人体艺术 人嘼杂交huangpian WWW_ZARA_COM xfplay长谷川惠美 我想日死你 贱货 国产夫妻交换磁力链接 俄罗撕黄色影片 动物性本能2 亚洲色图50p 外汇知识 梅西儿子 申请书样本 希年华企业名录网 黑丝袜模特逼图 胖人人体艺术照 李依晓人体艺术 欧美成人色套图 小男孩玩鸡鸡视频 我我我色日韩臊女 张筱雨嫩鲍 换女头小说 xxx破处 大姐影院 六九av影院 丝袜爱爱 妈妈和儿子的三级电影 苍井空种子怎么找不到 狗狗学习指南高级版全三册图片版pdf luanlu小说 苍井优在线观看 19岁女孩屄屄 京子20歳sm身体改造肛门拳交 有关父亲将儿子成为骚货的小说或视频 在美国做爱怎么说 斯嘉丽约翰逊人体艺术 wwwatv456com 比安卡竹榻上大胆性乐趣 萝莉av优篠崎爱 性感美女颗体大胆图 女人私处大胆人体 处女楔被干 乱淫淫乱农夫电影 我强奸美女姐姐 美女luo图片爱爱谷 春暖花开艳母动漫濑怡成心 超嫩逼逼的少d自拍 颜射无码迅雷下载 文玲成人小说淫淫 激情操必小说 偷拍美妞外阴视频 快播伦理影院全国若妻 姐妹大但人体艺术照 欧美巨奶妹妹图 成人教育av日日 解压密码私阴 欧美亚洲影音先锋 夜色王朝不能看图片 国模人体大全 上海同性恋图 免费下载熟妇h小说 美巨乳内射 我要吸姐姐的阴道 口肛交图片 熟妇自拍16p 脱北者说中国狗在吃饭 仓井空大胆露阴人体艺术 在线视频尺寸剪切 内衣大盗 成人炮图网址 人体露逼图片 乱伦乱摸乱交配 欧美丝袜乱伦图片 古典武侠校园春色wwwseyise8com 哥要蝴蝶谷娱乐中文网 日女儿的经验mmissno1com susu29som网址改成什么了 白白色白白撸 挺动肥白大腚 淫娃萝莉 少妇吉吉 李毅情趣小说 武侠古典皇后群交 888儿童吧吧吧 操妹网免费在线电影 老外老头恋老图片 亚洲荡 海贼王女主角图片 家庭伦理小说网址 jx886cc 日韩美女裸照露奶头 操妈妈大逼毛片948 淫荡骚穴丝袜图片 亚洲see明星 nwjbhnizcslcn 台湾佬中文中性娱乐草 白白色小明看看永久平台 WWWQVODWWWDYCOM 老奶奶屄色图 狼人综合狼人综合www27etcom 素素啪小说 野兽操女人小说 撸鸡巴大骚穴 靠逼小姨小说 熟女交流熟女论坛 久草热久操福利视频 WWWAAAk7C0M百度 乱伦做爱159p dnsaizhancomwww99ff0com 我要操做小姐的妈妈 japanhdvcom最新 黑人操亚洲人的小说 白胖子虐幼mp4 成人电视台mms地址 xfplay资源泷泽萝拉 让公狗插进逼了 五月少女艳情大奶妹 夜夜噜色色姐 先锋国产精品资源在线 贵妃网人兽 人与兽性交光盘 332aaaacn 免费试看5次 御女香帅 淫荡爆乳女教师 老爸干义母视频 陈丽佳露下体叉开腿艺术照 丝袜让人体艺术 sss480 免费黄色成人美乳 秋霞伦理电影大片 清宫性史免费观看 欧美激情爆操 亚洲色网动漫 日日啪夜夜撸免费视频 国产美女自慰偷拍自拍在线视频 撸水龙头射胸 超碰在线视频青青草97 叶欣桐最新视频 小泽玛利亚床上视频 姐姐干快播 看亚洲幼女性交视频 偷拍自拍自拍一区在线观看 日嫂嫂狠狠干小说 日本av美女脱衣视频 自拍公开网友上传 啊啊啊操妹妹 2233旗袍 靠逼在线观看 x6xx8com 搞搞电影网成人视频 666xxcon Ta色影院 强干少妇出水了 曰麻比 1校园春色影音先锋天堂 www5777ddcom下载 意淫强奸校园春色强奸乱伦 成人qvod影院 wwwluba88com wwwludashi666最新网址 黄色网口 顶破av片 日本盗撮在线视频 四房色播婷婷五月 7f5gcomshipin33html wwwhaoav 超碰视频119vvcom 哥必射 超碰最新上传视频27 欧美伦理电影中文字幕 欧美迷奸av zz12oocom姐姐要爱 伦理影院丝袜妻短片 快播伧理 色五月性爱图片 kb039 色欲影视插插插大全一 虐阴100种 天天撸一撸图 西西人体大胆做爱色图 a片婷婷五月大香蕉 黑人的大鸡 人人超碰在线观看百度 美国毛片oo www2233bbbcom 亚洲成人人妻乱伦呦呦 噜噜色噜噜色在线影院 古墓丽影2免费完整版mdyguocom 男人的天堂夜撸撸视频 wwwggg03 成人自拍偷拍微信视频 久久同性 老婆淫水乳房 大色小色播色网 另类小说五月综合网 人气女优小说 超碰国产片 gao41com 人兽性交视频观看 在线自慰视频@wwwdiyisecc 在线青青 有什么好看色网 美女妺妺亲哥哥图片 少年同志人体艺术 那好吧你懂的 778ffcom 色色365视频免费视频 2w片 和女主播啪啪啪小说 怎样看无码视屏 美乳艺校生06 东方a∨正在进入 黄色插穴 97五月天婷婷激情 神马性爱交易 18Aⅴ QQ浏览器www7977ddcom 羞涩涩 色图21P 首页鲍鱼鼓鼓鼓电影 河马xxx 乱操逼 大久爱爱电影网 操姐吧图片欣赏 女社长连裤袜下的美穴 义母伦电影 sss视频在线播放 淫 ti 欧美色图集锦 丰满熟女小说 草裙片 红果56女生七七视频做情 liushoulaotaitaibeiqiangjian 性门照 寡妇骚空姐 德国熟女群交乱伦 bt磁力链接五月婷婷 丁香五月成人亚洲色图 kobe9 premium ll林志玲浴室激战 风间悠美迷你裙 美退图片 成人潮吹影院 日韩女优性交在线 种子搜索 穴图 色钟欣桐的腿 今日视频 干姥姥网 美国都十次 丝袜宜春院图片 张柏之插穴图 搞笑一家人国语 华泰证券下载 曾几何时天魔的黑兔 智利时间 个性留言板 花样男子韩国版国语 会计学专业排名 嫩逼丝袜ing WWW001123COM 爱色裸图 裸模安可 童话村徐锦江 大色爱影音先锋 快播女忧小说 大便系列种子 日本女优武藤兰性交图 亚洲色图插插插插插 成人227免费视频 幼女性交一视频xxx一ok 女性人体艺术摄影 裸体乱伦电影 幼女裸体人骵艺术 xb电影网奇米影视 WWWGUGU2COM 成人性爱露脸自拍 日本美女淫色图 打开骆冰霪传 我肏了嫂子的屄 三级片3级片四级片视频 第一次操逼视频 全色网删除 快播最新欧美母子性爱 日本奶奶级别的片子 日本a片波多野衣暴风影音 WWWLUNLIDIANYINGCOM 偷拍家庭做爱视频 欲望湿逼骚水五月天 模特操b图 少妇入肉 搜狗人体艺术插美眉 大鸡巴插我小穴图片 操穴真经 幼女张开小穴 zxseqingwangzhan 谁有九月好莱坞艳照门图片 双性人的性爱世界种子 女人体艺术专题博客 pulick什么yd 欧美熟妇的屄厕所视频 继父日女儿屄小说 在线另类幼女国外 A片毛片免费观看天天干 后入雪白大屁股美女 黄姓小模激情影片 www1122whcom 涩情网站网孕妇图片 超碰超爽超公开视频 国产骚老婆自拍 小妹妹爱大香蕉小说 成人电网影播放器下载 juse五月 虐蛋蛋番号 日本滛岁影片介绍 中文字幕偷窥自拍伊人成人 尻美女小说 shsh123456亚洲美女 偷拍淫荡性爱色姐姐 舔阴猛人网站 97咪咪碰 日韩av午夜剧场成人电影网 经典开心撸亚洲淫乱无码 偷拍嫂嫂的图片 超碰无毛小女孩 亚洲AV之妻不如妾小说 成人有声小说 屏保春色 春色盈盈 能用快播的h网 h网介绍 开心网 五月天 鼓励看黄片 5252黄色小说 浪妹社区 欧美图床 我色你影院 逍遥色导航 高清在线电影 在线成人短片 92com 亚洲AV怡红院 567丁香五月天在线 亚洲欧洲日韩漫画 张柏芝三级手机在线观看 在线亚洲森川安娜 宇都宫939观看 管野亚梨沙 媲美欣65部连接 magnet 高桥圣子108手机在线 三级色站 zooskooist 91成人网 潮吹福利手机在线播放 正在播放上原亚衣 女仆中出 小泽玛利亚av护士在线 秋霞电影山潘金莲 日韩亚洲日本欧美国产高清av 日日操夜夜鲁日日拍拍 有色hd高清国产视频 日本人六九视频jllzz 日本人性交视频 邪恶直播软件 大桥未久恸哭的女教师 韩国vip福利在线播放 恋母 8787影院影视午夜福利 国产主播热舞4000部在线视频 成人手机在线视频 magnet 绿衣服女孩自摸 1人妻在线a免费视频 6080午夜神马福利 点点色视频 偷偷偷拍 tpmlage视频在线观看 eluosi xingai ship 强奸女医生迅雷下载 tube一本道视频 自拍78p 女色仆影院 水菜丽百度影音 小公主影院av 春药步兵百度网盘 av欧美深喉口爆视频 偷拍自拍第11页 uoco图库福利 伦理。 小草h在线 200GANA-1485 极度色影院 缴情综合网深情五月 东京热av精油系列 人人操 视频 av大师 古典武侠狠狠第七页 福利757午夜云播 欧美Av中文字幕欧美-区 老鸭网123 欧美在线 ftp AV视频中文字幕 欧美六九视频 八四色色 大桥未久在线视频 日本家庭系列和母亲爱爱 西瓜影音 有賀遊空 二宫沙树 saki ninomiya 福利拍拍影视 98福利视频试看1分钟 色院影视 豆豆去成·人网 东方ev在线播免费 k6 午夜福利 澳门赌场视频偷拍久久 国产激情对白在线观看 五茹娘導航 伦理福利五码 国产精品自拍偷拍在线观看 三级片福利电影 小向美奈子AV在线看 卵蛋邪恶虎牙 神马神院我不卡午夜福利 大桥未久人妻mp4 16 岁的同性恋视频英文网站 野狼av社区天堂网在线 蓝色导航福利 亚洲 欧洲 中文 日韩 韩国大乳人妻视频 天天曹天天插天天摸 av毛片在线观看直播 越南大屌插在线视频 maomi最新地址百度知道 看片软件免费安全的 avzon 国产污星人福利视频 小清新成人影视网站 新视觉啪啪影院 香港经典三级免费在线观看 小野寺梨纱无码 magnet 精管 龟头 子宫 射 高潮 y影院安全吗 九哥橾比网 91视频日本啪啪啪 死肥宅的氪金援交(全彩)漫画 _caoporm超碰 青娱乐全国楼凤验证 正在播放:女友很听话 身高172 颜值爆表 腿长屁股大 后入尤其过瘾 可接受3P 亚洲伦理视频伦理聚合 熟女人妻 - 毛片基地 西瓜影音 熟女女优一本道 色尼姑迅雷磁力链接 magnet 明里つむぎav作品在线播放 迅雷哥无码区 好屌700 色哒哒在线电影 www,kk444,cm页面升级 步行街潮流服装店的短发喜欢 仓井空系列种子磁力链接 国内自拍性爱视频网站 国产自拍国产秒拍 不用下载app能看的操逼视频 和大奶女友先69 h小说纯肉 百度云 尼姑色 被邻居高傲人妻 香港三级片秋霞网 天狼在线观看苍井空av 神马午夜影院by88 黄色网站你懂得 男人天堂3017 pv7758Cnm 爆操大奶美女视频 不知火舞3D里番 超级yin荡的高中女1 五月天热巴合成视频 456午夜福利影院 sesesessses 自拍在线视频公开 骚大妈大花心视频 波多野结衣黑人番外篇 影音先锋强奸乱伦在线看 欧美熟女内射视频 邪恶姐弟动漫小视频 黄片巨乳老师 四虎之另类视频 亚洲美女福利视频网站 灰灰视频Av在线视频 苍井优黄片视频 国产猛男小姐高潮 国产真实泄露在线 本土成人线上免费影片 波多野结衣在线CK 两只硕大的巨乳涨奶水 慢画色 骚逼美女被插写真图 成人片SM 成人国产自拍漫画 在线不用播放器av网址 69pao国产在线播放 李丽珍三级合集种子迅雷mp4 啪啪啪tossgirl 国产伦理道德动态图 www588mm 欧美白人磁力链接 小妹打泡一级黄片毛 网友自拍熟女人妻在线 日本韩国 magnet 居家少妇露脸18p 国内自拍激情免费 干日本姝AV 美女被操流淫 伦理动漫狠狠 色友吧在线视频 情侣自拍。 mp4 瑾美香 骑兵DVAJ 迷奸大学生磁力链接 下载 啪啪视频2018年免费正片 妈妈好紧好舒服视频 kmsp70快猫 12岁小女孩尿道视频 黄色网站护士三级片 qplayer在线播放网址 汤姆影院AVt0n _ee255com 日本zj视频 4438x成 人大色 邪恶剧情动态饭粒网 完美看看鬼父 国产自拍视频跳舞 欧美巨乳丝袜在线视频 98人妻免费公开视频 国产夜夜郎视频 母子性交自拍视频磁力链接 韩国三级美味啪啪啪片视频展播 国产自伯在线 好屌妞精品视频在线观看 男女啪啪啪视频抽插 青青草 国产自拍 第一页 星野亚希校服 男友吸胸部爱爱视频 迷奸美女磁力 下载 久久pao 中文欧美目韩亚洲在线 微兔云 (男保罗衫) -(十字绣成品) 677rr mp4 韩日AV 一本道 群交 在线播放 欧洲性交做爱激情视频 韩国自拍做爱视频 纯做爱小说 anquye亚洲图片 wwwvvcon 成人在av 汤唯祼体图片欣赏 父侵操逼 谁有黄色qq号可以早qq空间看的2014 裸体女图片一级 淫荡人妻爱色 三点苍井空影音先锋观看 欧美小学生性交