HPGL

HP-GL (Hewlett-Packard Graphics Language; often written as HPGL) is a printer control language created by Hewlett-Packard (HP). HP-GL was the primary printer control language used by HP plotters. It later became a standard for almost all plotters. Hewlett-Packard's printers also usually support HPGL in addition to PCL.

Design

The language is formed from a series of two letter codes, followed by optional parameters. For instance an arc can be drawn on a page by sending the string:

AA100,100,50;

This means Arc Absolute, and the parameters place the center of the arc at absolute coordinates 100,100 on the page, with a starting angle of 50 degrees measured counter-clockwise. A fourth optional parameter (not used here) specifies how far the arc continues, and defaults to 5 degrees.

Examples

Typical HP-GL files start with a few setup commands, followed by a long string of graphics commands. The file was in ASCII (text file) format, for instance:

The coordinate system was based on the smallest units one of the HP plotters could support, and was set to 25 µm (i.e. 40 units per millimeter, 1016 per inch). The coordinate space was positive or negative floating point numbers, specifically ±230.

Podcasts:

PLAYLIST TIME:
×