[comp.sys.ibm.pc.programmer] bgi driver woes

dale@NCoast.ORG (Dale Smith) (03/20/90)

I have been working with the BGI tookit, writing a device driver for
HPGL plotters.  If you do a series of moveto(x, y) commands, the BGI
DRAW driver routine is never called, a LINE command followed by two
MOVE commands is issued instead.  That's not so bad, but the
destination for the LINE command is not the x,y from moveto().
Example:

	C			BGI driver
	-----------------	--------------------
	moveto(x1, y1);		MOVE x1,y1
	lineto(x2, y2);		LINE x2,y2 to x1,y1
				MOVE x2,y2
				MOVE x2,y2
	lineto(x3, y3);		LINE x3,y3 to x2,y2
				MOVE x3,y3
				MOVE x3,y3

This is fine for crt graphics, but is terrible for a plotter.  If I do
a lineto(), I want the pen to move from the current position to the
new position.  Not lift up the pen, move to where I want to go, then
draw a line back to where I was, then lift up the pen and go to where
I want to go to again (and then do another move again for good
measure!).

Questions:

Is this fixed in a later version of the BGI and I just have an earlier
one?

If I bought the source to the libraries, are the routines in
graphics.lib included (so I can change them)?

Anyone with any experience writing a bgi driver, please let me know
what horror stories you've had. ;)

Oh yeah, I don't have a compuserve account, so I can't contact the
nice folks at borland.

-- 
Dale P. Smith
                            dale@ncoast.org
                     ncoast!dale@cwjcc.cwru.edu
uunet!cwjcc.cwru.edu!ncoast!dale
-- 
Dale P. Smith
                            dale@ncoast.org
                     ncoast!dale@cwjcc.cwru.edu
uunet!cwjcc.cwru.edu!ncoast!dale