🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
1 messages
1 total messages Started by Dale Smith Tue, 20 Mar 1990 04:48
bgi driver woes
#92
Author: Dale Smith
Date: Tue, 20 Mar 1990 04:48
48 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads