/hp2xx

The `hp2xx' program is a versatile tool to convert vector-oriented graphics data given in Hewlett-Packard's HP-GL plotter language into a variety of popular both vector- and raster-oriented graphics formats.

Primary LanguageCGNU General Public License v2.0GPL-2.0

Installation

autoconf
autoheader
automake --add-missing
./configure
make
sudo make install

Changelog

Recent changes in the 3.5.0 development ("alpha") series:

3.5.0a35:

  • Fixed miter calculation for wide lines. Allowed setting width and color of all 256 pens by the -c and -p options. Partial code cleanup. Some changes to the RTL interpreter. PE decoding now ignores linebreaks.

3.5.0a31-34:

  • Fixed parsing of AD,SD,MG. Added sane default for pen number.

3.5.0a30:

  • added new mode "iso", ISO G-code optimized for Gerber cutters, with special option for conventions used in the textile business
  • added preliminary shellscript for cross-compiling (Linux to Windows) with MINGW

3.5.0a29:

  • libharu-PDF output lacked an error handler and could fail for certain combinations of dots and lines (fixed by Andrew Jackson)
  • implemented most of the code for handling TIFF-encoded PCL images (based on a test case from Prakash Gajera)

3.5.0a28:

  • Implemented polygon filling by winding rule (FP1).
  • Improved paper size selection in the PCL module

3.5.0a27:

  • more PDF updates/fixes related to libharu2.
  • number of fill lines for solid fills now calculated from dpi, should improve performance without changing quality.
  • Solid fills now also draw the outline of the polygon to catch special cases where one of the boundary lines is not an edge.

3.5.0a26:

  • updated libharu-based PDF output for new libharu2.

3.5.0a25:

  • PDF output now supports password protection (based on a patch by Horst Liesinger, see sample resource file PDF_Per.ini in the doc directory)
  • truetype rendering had one extraneous character set conversion that could lead to wrong characters being displayed

3.5.0a24:

  • restored and improved truetype font rendering, fixed manpage, restored wedge filling.

3.5.0a23:

  • RTL images now respect HPGL ROtation and use a luminance-based grayscale palette instead of black and white.

3.5.0a22:

New features:

  • Initial support for HP-RTL raster images. The only image format that is actually rendered - and only in black and white - is unencoded or delta-encoded, color-by-pixel (as generated by CATIA), most other formats and related commands are at least read and reported.

3.5.0a21:

Bug fixes:

  • adjusted tolerance factor for polygon outline detection.
  • updated to_pdf.c to reflect changes in recent versions of libharu.

3.5.0a20

New features:

  • line cap and join style support in SVG export

Bug fixes:

  • really applied the polygon fill improvements that should have been in a19.
  • suppressed warning about missing color support for modes that do provide color.

3.5.0a19

Bug fixes:

  • added handling of special cases (scanline hitting a vertex) in the polygon fill code
  • reinstated a scaling transform in the clipping code

3.5.0a18

Bug fixes:

  • "square" line ends were incorrectly calculated in most cases

  • the Esc-E plotter reset sequence was not recognized

  • tightened some limits that could cause extraneous lines in polygon fills and objects drawn with wide pens

  • corrected typing errors that lead to incorrect definition of some characters in sets 2 and 3 (patch by Anton Hadinger)

  • removed the "degenerate line" warning message

3.5.0a17

Bug fixes:

  • hp2xx no longer terminates if the first plot in a file consists of non-drawing commands only. Suppression of empty images has been made more reliable.
  • removed extraneous SP commands in the 'simplified hpgl' output

3.5.0a16

Bug fixes:

  • all invalid HP-GL instructions are now reported and ignored, instead of causing an immediate abort. Additionally, the appropriate error condition code is set for querying with the OE and OS instructions, and OI reports the hp2xx version number as its "plotter model identification".

3.5.0a15

Bug fixes:

  • hp2xx now ignores invalid move/draw coordinates (as a plotter would) instead of aborting.
  • Fixed segmentation fault on exit if output was sent to stdout.

3.5.0a14

New features:

  • added a new option "-u", "--uniform_width" to re-enable the simple wide-line drawing algorithm of pre-3.4.3 versions, as the new code can create ragged-looking lines in some circumstances

Bug fixes:

  • Circles were sometimes not clipped correctly, causing extra borders around plot
  • Polygons entered into the canvas size calculation unscaled, causing excessive borders and images that grew when rotated.

3.5.0a13

New features:

  • GIF output module (based on netpbm's ppmtogif.c and hp2xx' own to_png.c)
  • enabled LZW compression option in TIFF output (provided libtiff offers it)

3.5.0a12

Bug fixes:

  • When a single AD or SD command contained more than one font option, only the first one was read.
  • IW clip window coordinates were scaled twice if scaling was in effect.
  • IW sometimes clipped labels when it should not.

3.5.0a11

Bug fixes:

  • Solid fills did not take scaling into account, creating stripe patterns in some circumstances (Simon Clayton).
  • Polygons composed of 'pen up' moves only resulted in a huge amount of fill lines being calculated, none of which was actually drawn. This could cause serious slowdown of the program and excessive temporary diskspace usage. (This problem may have been triggered by the corrections in alpha10) Such polygons should now be correctly rendered by FP, and be ignored by EP.

3.5.0a10

Bug fixes:

  • Polygons were not rendered correctly (or not at all) when polygon mode was entered with the pen up.
  • Clipping of arcs and circles could leave a spurious line behind
  • Some of the not yet supported AD/SD font parameters could change the font linewidth instead.

3.5.0a9

New features:

  • EPS driver now creates a postscript file (including the PageSize Feature, which - unlike the BoundingBox is honored by ghostscript et al.) when used with -S 1 option (suggested by Hannu Virtanen). Note that 3.5 also will have a full-featured postscript driver (currently needing just some more work in polygon and fill handling).

Bug fixes:

  • reverted the 'Esc%0A acts as pagebreak' change of a8, as it broke files like our spectrum.plt example where it is immediately followed by Esc%0B. This may have to become a configurable option.
  • Fixed several bugs in the 'wide line miter' code that could lead to spurious lines being drawn and miter regions being left unfilled.
  • Made automatic closing of polygons by PM2 work again.

3.5.0a8

New features:

  • The 'leave HPGL mode' Esc sequences Esc%0A,Esc%1A now act as separators for multi-image files.

Bug fixes:

  • user defined raster fills were broken before release, when i added the percentage fills without some crucial braces.

3.5.0a7

New features:

  • Added support for filltypes 10 (percentage), 11 (user-defined) and the RF (raster fill) command

3.5.0a6

Bug fixes:

  • fig and rgip module aborted when asked to change color of pen 0.
  • penwidth was reset to that of pen 1 (instead of that of the current pen) after polygon fills

3.5.0a5

Bug fixes:

  • pdf output module was not adapted to the new highlevel command handling scheme

New features:

  • hp2xx can now be compiled against Takeshi Kanno's Haru Free PDF Library for pdf export (which, unlike PDFLIB, is available under the PNG/ZLIB license and thus may be used royalty-free even in commercial settings)

3.5.0a4

Bug fixes:

  • Files containing both SCaled coordinates and polygons were rendered with an extra margin in some circumstances (initial patch by Hans Peter Rueger)
  • miscalculation of the pattern anchor point could lead to polygons being left unfilled (i.e. invisible) in the same circumstances.

3.5.0a3

Bug fixes:

  • HPGL commands given in lowercase were ignored (very old bug, found and fixed by Yuishi Fujishige)
  • Several of the template Makefiles were missing quotation marks on some 'echo' commands (Christian Zuckschwerdt)

3.5.0a2

Bug fixes:

  • Corrected my misapplication of Eugenes previous patch, which broke IW handling (Eugene Doudine)
  • AT code was far too simple and would give numerical errors or strange results in most if not all non-trivial cases. (Eugene Doudine)
  • Fixed several cases where the pen is lowered and raised without being moved, but the resulting point was not drawn. (Eugene Doudine)
  • Test case pages.hp was missing the mandatory SP command, generating strange results.

3.5.0a1

New features:

  • Support for drivers that provide native routines for polygon filling (currently implemented in a new postscript driver) (Eugene Doudine).