[comp.lang.pascal] .BGI file structure

>@adm.BRL.MIL (12/11/89)

> From: Jonathan Schull <J_SCHULL%HVRFORD.BITNET@cornellc.cit.cornell.edu>
> Subject: Hardcopy for Borland BGI graphics.
> 
> I've written several programs using the Borland Graphics
> Interface to put graphics on to the screen.  Now I want hardcopy.
> 
> Is there a simple way to route graphics output to
>  an apple laserwriter
>  an IBM compatible printer
>  an HP Plotter
> 
> "Simple" would require the least modification of the existing programs.
> Really "simple" would be a BGI file for each device.
> Then, only the initgraph command would need to be changed, right?

I have the same problem. And I suppose, lots of people have, too.
And everyone needs a BGI file for different devices. (I need it
for HP LaserJet II, for example).

Let's generalize the question: Does anyone know the structure of
the .BGI files? Is it published somewhere? Or even more, is there
a sample source code for a sample device to generate a .BGI file?

Thank YOU for ANY help.

Joseph

glenn@skybridge.scl.cwru.edu (Glenn Crocker) (12/11/89)

In article <21711@adm.BRL.MIL> >@adm.BRL.MIL writes:
>
>> From: Jonathan Schull <J_SCHULL%HVRFORD.BITNET@cornellc.cit.cornell.edu>
>> Subject: Hardcopy for Borland BGI graphics.
>> 
>> I've written several programs using the Borland Graphics
>> Interface to put graphics on to the screen.  Now I want hardcopy.
>> 
>> Is there a simple way to route graphics output to
>>  an apple laserwriter
>>  an IBM compatible printer
>>  an HP Plotter
>> 
>
>Let's generalize the question: Does anyone know the structure of
>the .BGI files? Is it published somewhere? Or even more, is there
>a sample source code for a sample device to generate a .BGI file?
>
>Joseph

There are some files in /e/bin4/ at grape.ecs.clarkson.edu (anon-ftp) which
contain a sample .bgi file (in TC).  I would assume that the specs are there
or could (with a bit of effort) be divined from the source.  If you can't 
ftp, mail me and I can send you the file(s).

-Glenn Crocker
Glenn Crocker
glenn@skybridge.scl.cwru.edu

Brown Rice.

js@hpsgrt1.HP.COM (Johann SEET) (12/13/89)

>> From: Jonathan Schull <J_SCHULL%HVRFORD.BITNET@cornellc.cit.cornell.edu>
>> Subject: Hardcopy for Borland BGI graphics.
>> 
>> I've written several programs using the Borland Graphics
>> Interface to put graphics on to the screen.  Now I want hardcopy.
>> 
>> Is there a simple way to route graphics output to
>>  an apple laserwriter
>>  an IBM compatible printer
>>  an HP Plotter

For those of you who would rather not mess around with BGI, I have used
"GraphLink", a commercial software, several times to output Turbo Pascal
graphics to the printer.  The software emulates most of BGI functions
and is able to trap BGI calls so that you only need add a couple of
lines to your source code.  It is not a low resolution screen dump, but
rather, outputs graphics at the full resolution of the printer.  It also
includes a pretty decent looking scalable font.  You include the unit
under the USES statement and include a line or 2 of initialization
code.

I've found GraphLink quite intelligent about memory allocation -- it
breaks the page up into small squares and allocates memory for them only
if there are black pixels present.  It knows about EMS too, but
unfortunately, if this isn't available, you'll have to manually do
banding to output full page graphics to a high resolution printer if
your picture has a high percentage of black.

The manual indicates that the following devices are supported:  Epson
9/24 pin, IBM Proprinter/QuietWriter, NEC 24pin, Toshiba 24pin, HP
LaserJet/DeskJet at 100/150/300 dpi.

Their address is:
	Visitech Software
	D5 3807 Ridgewood Ct.
	Pittsburgh, PA 15239
	(412) 733-4775
	Can't remember the cost, but should be <$100.

Note: I have no connection with Visitech except from being a satisfied
customer.  I do not speak for my employer. Blah, blah, blah .....
-------------------------------------------------------------------
Johann Seet
Asian Peripherals Division
Hewlett-Packard Singapore
js%hpsgrt1@hp-sde.sde.hp.com
-------------------------------------------------------------------