Using HPGL as a drawing interchange media
(Don't! Unfortunately many DOS/Windows insist on doing so)
Written by Paul Bourke
September 1992
This document is also available in Russian , thanks to Sergey Paramonov.
(You will need the Russian font t!)
Introduction
HPGL is the HP graphics language designed for specifying 2D graphical information for the HP range of plotters. It was not intended as an interchange format but some software suppliers u it as such. At least it is efficient and easy to write and read. This short note describes tho aspects of the format which may be ud to describe geometry. The language itlf has a large number of instructions, most of the ones not touched on here rel
ate directly to plotter devices, for a full description of the language the HPGL description is normally provided with an HPGL compatable plotter.
Basics
HPGL commands are basically two upperca character instructions followed by any arguments, and finally ending in the parator character which is a micolon by default. The arguments are normally parated by commas. String arguments are normally terminated by carriage return.
In what follows, all the standard HPGL commands are listed, tho which are likely to be uful for data interchange will be discusd at the end of this document. Optional arguments for any command are shown in brackets.
Commands
格调沙发
Instruction Arguments
AA Arc Absolute x,y,angle(,tolerance)
AF Advance page
AH Advance page
AP Automatic Pen Operations n
AR Arc Relative x,y,angle(,tolerance)
AS Acceleration Select acceleration(,pennumber)
BF Buffer Plot
BL Buffer label string
CA Select Alternative Chart t
CC Character chord angle angle
CI Circle radius(,tolerance)
CM Character Selection Mode switchmode(,fallbackmode)
白菜英语CP Character Plot spaces,lines
希翼CS Select Standard Chart t
CT Chord Tolerance n
小狗卡通
CV Curved line generator n(,inputdelay)
CD Digitize Clear
DF Default
亲爱的汉修先生读后感DI Absolute Direction run,ri
DL Define Download character charnumber(,pencontrol),x,y(...)
DP Digitze Point
DR Relative Direction run.ri
DS Designate Chart slot,t
DT Define Label Terminator terminator
EA Edge Rectangle Absolute x,y
EP Edge Polygon
ER Edge Rectangle Relative x,y
ES Extra Space spaces(,lines)
EW Edge Wedge radius,startangle,sweepangle(,tolerance)
土窖
FP Fill Polygon
定向培养FS Force Select force(.pennumber)
FT Fill Type type(,spacing(,angle))
GC Group Count countnumber
GM Graphics Memory (polygonbuff)(,downloadbuff)(,replotbuff)(,vectorbuff)
GP Group Pen (groupnumber(,pennumber(,numberofpens,(length))))
teg
IM Input Mask emaskvalue(,smaskvalue(,pmaskvalue))
IN Initialize
IP Input p1 and p2 x,y(,x,y)
IV Invoke Character Slot slot,(left)
IW Input Window x,y,x,y
KY Define Key key(,function)
LB Label string
LO Label Origin positionnumber
LT Line Type patternnumber(,patternlength)
NR Not Ready
PA Plot Absolute x,y(,...)
PB Print Buffered Label