Article View: comp.sys.ibm.pc.programmer
Article #92bgi driver woes
From: Dale Smith
Date: Tue, 20 Mar 1990 04:48
Date: Tue, 20 Mar 1990 04:48
48 lines
2025 bytes
2025 bytes
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
Technical Details
Message-ID:
<1990Mar20.044815.26045@NCoast.ORG>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwjcc!ncoast!daleShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwjcc!ncoast!dale From: dale@NCoast.ORG (Dale Smith) Newsgroups: comp.sys.ibm.pc.programmer Subject: bgi driver woes Message-ID: <1990Mar20.044815.26045@NCoast.ORG> Date: 20 Mar 90 04:48:15 GMT Organization: North Coast Public Access *NIX, Cleveland, OH Lines: 48