Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
HP-GL
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Design == The language is formed from a series of two letter codes ([[mnemonic]]s), followed by optional parameters. For instance an [[Arc (geometry)|arc]] can be drawn on a page by sending the string: <code>AA100,100,50;</code> This means ''Arc Absolute'', and the parameters place the center of the arc at absolute [[Cartesian coordinate system|coordinates]] 100,100 on the page, with a starting angle of 50 [[Degree (angle)|degrees]] measured counter-clockwise. A fourth optional parameter (not used here) specifies how far the arc continues, and defaults to 5 degrees. When first introduced, HP-GL contained the following commands: {| class="wikitable" ! Command ! Meaning |----- ! colspan=2 | Vector Group |----- | <code>PA</code> x,y{,x,y{...}<nowiki/>} || Plot absolute [i] |----- | <code>PR</code> x,y{,x,y{....}<nowiki/>} || Plot relative [i] |----- | <code>PD</code> || Pen down |----- | <code>PU</code> || Pen up |----- ! colspan=2 | Character Group |----- | <code>CA</code> n || Designate alternate character set n [i] |----- | <code>CP</code> spaces, lines || Character plot [d] |----- | <code>CS</code> m || Designate standard set m [i] |----- | <code>DI</code> run, rise || Absolute direction [d] |----- | <code>DR</code> run, rise || Relative direction [d] |----- | <code>LB</code> c, ..., c || Label [[ASCII]] string [c] |----- | <code>SA</code> || Select alternate character set |----- | <code>SI</code> wide, high || Absolute character size [d] |----- | <code>SL</code> tan ΞΈ || Absolute character slant (from vertical) [d] |----- | <code>SR</code> wide, high || Relative character size [d] |----- | <code>SS</code> || Select standard character set |----- | <code>UC</code> x, y, pen{, ...} || User defined character [i] |----- ! colspan=2 | Line Type Group |----- | <code>LT</code> t{,l} || Designate line type t and length l [d] |----- | <code>SM</code> c || Symbol mode [c] |----- | <code>SP</code> n || Select pen [i] |----- | <code>VA</code> || Adaptive velocity |----- | <code>VN</code> || Normal velocity |----- | <code>VS</code> v{,n} || Select velocity v for pen n [i] |----- ! colspan=2 | Digitize Group |----- | <code>DC</code> || Digitize clear |----- | <code>DP</code> || Digitize point |----- | <code>OC</code> || Output current position and pen status |----- | <code>OD</code> || Output digitized point and pen status |----- ! colspan=2 | Axes |----- | <code>TL</code> tp{,tn} || Tick length [d] |----- | <code>XT</code> || X axis tick |----- | <code>YT</code> || Y axis tick |----- ! colspan=2 | Set-Up Group |----- | <code>IP</code> p1x,p1y,p2x,p2y || Input p1 and p2 [i] |----- | <code>IW</code> xlo,ylo,xhi,yhi || Input window [i] |----- | <code>OP</code> || Output p1 and p2 [i] |----- ! colspan=2 | Configuration Status |----- | <code>AP</code> || Automatic pen pickup [i] |----- | <code>DF</code> || Set default values |----- | <code>IM</code> e{,s{,p}<nowiki/>} || Input e, s and p masks [i] |----- | <code>IN</code> || Initialize |----- | <code>OE</code> || Output error [i] |----- | <code>OS</code> || Output status [i] |} {|class = wikitable |+ Commands added (when?) | {{code|SI}} w,h || set character width and height |} Formats: * [i]: integer formats between -32767 and 32768. No decimal point. * [d]: decimal format between +/- 127.9999. Optional decimal point. * [c]: ASCII character
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)