hp2xx originally emulated a subset of the Hewlett-Packard 7550A plotter.
The following manual was used as reference for command definitions:
[1] HP 7550A Interfacing and Programming Manual. This has gradually
been expanded to include almost all of what is now known as HPGL/1, and
most of the commands from HPGL/2.
Not all commands are supported. Among the non-supported commands are those which do not really apply to a software emulator, like:
commands affecting the communication between plotter and host computer, commands for changing the behaviour of a real plotter, like plotting speed etc., commands for the control of plotter memory allocation, commands causing various plotter display outputs.
Other non-supported commands would be desirable, but were left out due to their inherent complexity (or just because nobody had an immediate need for them yet).
Programmers intending to add more HP-GL features should ideally take care to
implement the less-than-obvious side effects of existing commands on
the new features, too (and vice versa). E. g., line types (LT;)
affect most but not all drawing commands: While the ER; command
(edge rectangle relative) uses the current line type, its counterpart
EA; (edge rectangle absolute) always draws solid lines. However,
both PR; and PA; use the current line type! In addition,
new features may need initializations by the already supported
codes IN; or DF;, so these may have to be expanded.
The remainder of this section lists all HP-GL commands given on pages 1-2 to 1-4 of [1] and marks them as either
(.) not applicable,
(-) ignored, or
(+) supported.
The label "supported" is used when I think the command is fully supported in the context of the already implemented commands. In general, you should have absolutely no problem with this class of commands.
Though there still are unsupported commands, this does not mean that
you might have trouble using hp2xx. Nowadays, most HP-GL files are
machine-generated, e.g. by CAD or DTP programs. These tend to make use
of just a subset of HP-GL. To my experience, chances are high
that hp2xx will give you the picture you want! (Areas where hp2xx
is definitely lacking are font support and polygon fills, but even there
you should get a good approximation of what a plotter would produce).
HP-GL|s n| Description & RemarksCmd | i |=====|===|========================================================AA |+ | Arc AbsoluteAC |+ | Anchor cornerAD |* | Alternate font DefinitionAF |+ | Advance Full page [same as PG]AH |+ | Advance Half page [same as PG]AP | .| Automatic pen operationsAR |+ | Arc RelativeAS | .| Acceleration selectAT |+ | Arc through three points-----|---|--------------------------------------------------------BP |+ | Begin PlotBL |+ | Buffer LabelBR |+ | Bezier curve, RelativeBZ |+ | Bezier curve, Absolute-----|---|--------------------------------------------------------CA |+ | Designate alternate character setCC | - | Character Chord angleCF | - | Character Fill modeCI |+ | CircleCM | .| Character selection modeCO |+ | File commentCP |+ | Character plotCR |+ | Color RangeCS |+ | Designate standard character setCT |+ | Chord toleranceCV | .| Curved line generator-----|---|--------------------------------------------------------DC | .| Digitize clearDF |+ | DefaultDI |+ | Absolute directionDL | - | Define downloadable characterDP | .| Digitize pointDR |+ | Relative directionDS | - | Designate character into slotDT |+ | Define label terminatorDV |+ | text Direction Vertical-----|---|--------------------------------------------------------EA |+ | Edge rectangle absoluteEC | .| Enable paper CutterEP |+ | Edge polygonER |+ | Edge rectangle relativeES |+ | Extra spaceEW |+ | Edge wedge-----|---|--------------------------------------------------------FI | - | pcl Font IDFN | - | pcl secondary Font NumberFP |+ | Fill polygonFR | - | FRame advanceFS | .| Force selectFT |+ | Fill type-----|---|--------------------------------------------------------GC | .| Group countGM | .| Graphics memory-----|---|--------------------------------------------------------IM | - | Input error reporting maskIN |+ | InitializeIP |+ | Input P1 and P2IR |+ | Input Relative P1 and P2IV | - | Invoke character slotIW |+ | Input window-----|---|--------------------------------------------------------KY | .| Define key-----|---|--------------------------------------------------------LA |* | Line AttributesLB |+ | LabelLM | - | Label mode (for two-byte character sets)LO |+ | Label originLT |+ | Line type-----|---|--------------------------------------------------------MC | - | Merge ControlMG |+ | Message [same as WD]MT | .| Media Type-----|---|--------------------------------------------------------NP |+ | Number of PensNR | .| Not ready (unload page and go offline)-----|---|--------------------------------------------------------OA | .| Output actual position and pen statusOC | .| Output commanded position and pen statusOD | .| Output digitized point and pen statusOE | - | Output errorOF | - | Output factorsOG | .| Output group countOH | - | Output hard-clip limitsOI | .| Output identificationOK | .| Output keyOL | - | Output label lengthOO | .| Output optionsOP |+ | Output P1 and P2OS | - | Output statusOT | .| Output carousel typeOW |+ | Output window-----|---|--------------------------------------------------------PA |+ | Plot absolutePB |+ | Print buffered labelPC |+ | Pen ColorPD |+ | Pen downPE |+ | Polyline EncodedPG |+ | Page feedPP | - | Pixel placementPR |+ | Plot relativePS |+ | Plot SizePT |+ | Pen thicknessPU |+ | Pen upPW |+ | Pen Width-----|---|--------------------------------------------------------QL | .| Quality Level-----|---|--------------------------------------------------------RA |+ | Fill rectangle absoluteRF | - | Raster Fill patternRO |+ | Rotate coordinate systemRP | - | ReplotRR |+ | Fill rectangle relativeRT |+ | Relative arc through Three points-----|---|--------------------------------------------------------SA |+ | Select alternate character setSB | - | Scalable or Bitmap font selectionSC |+ | ScaleSD |* | Standard font attribute DefinitionSI |+ | Absolute character sizeSL |+ | Character slantSM |+ | Symbol modeSP |+ | Select penSR |+ | Relative character sizeSS |+ | Select standard character setST | .| Sort vectorsSV | - | Screened Vectors-----|---|--------------------------------------------------------TD | - | Transparent DataTL |+ | Tick lengthTR | - | Transparency mode-----|---|--------------------------------------------------------UC |+ | User-defined characterUF | - | User-defined fill typeUL |+ | User-defined line type-----|---|--------------------------------------------------------VS | .| Velocity select-----|---|--------------------------------------------------------WD |+ | Write to displayWG |+ | Fill wedgeWU |+ | pen Width Unit-----|---|--------------------------------------------------------XT |+ | X-Tick-----|---|--------------------------------------------------------YT |+ | Y-Tick
Go to the first, previous, next, last section, table of contents.