HPGL

A

Thread Starter

Aragorn

I'm working in a SCADA and I need some information about hpgl because I want to transform a bitmap to hpgl, I'm working in QNX.
Thanks
 
M

Matt Hortman

> I'm working in a SCADA and I need some information about hpgl because I want to transform a bitmap to hpgl, I'm working in QNX.

HPGL (Hewlett Packard Graphics Language) is a vector based language used to drive pen plotters. It will be pretty inefficient to transform a bitmap to HPGL. ('Course that's not what you asked. :) Check out HP's site. They should have some kind of reference available.

If you strike out, send me an email ([email protected]). I've got a book somewhere on HPGL.
 
G

Greg Goodman

i wrote an HP-GL/2 output module using the language syntax summary from the appendix of my plotter's user's manual. it's not difficult, and if you actually do it, i suggest using the language reference for your target device. (not all devices support the same variant of HP-GL.)

however, as the previous respondent pointed out, the commands are vector graphic commands; the language was designed to move the pen(s) of a plotter to (x,y) coordinates, and draw lines, characters, and geometric shapes.

unless you have a vector description of your bitmap image, the only way i can see rendering it with HP-GL is by dividing your plotting surface into a raster and filling each of its 'pixels' with a square of circle of the color from the bitmap. an interesting exercise, but probably not worth the trouble.

the real question is, why do you want to render a bitmap in HP-GL? what are you going to do with it? who's going to look at it, using what?
 
A

Anthony Kerstens

Grab an old pen plotter manual if you can.

I also seem to remember one of the manuals of
Autocad version 10 had the HPGL commands listed. It may have been the LISP programming
guide, if that helps :)

It should be simple since you just the pen up
(PU) and pen down (PD) commands along with the
coordinates. If I remember correctly, and it has been a while, but I think its like this:

PU 0,0 PD 0,10 PU 1,0 PD 1,10

This should draw two parallel lines of length 10
points. There should probably be an end or file
or something like that, but I can't remember.

Grab a windows computer, install an old plotter
driver, and send some plots to a file. It should
get you all you need.

Anthony Kerstens P.Eng.
 
Top