www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/01/10:30:11

Xref: news2.mv.net comp.os.msdos.djgpp:6669
From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Printers
Date: Tue, 30 Jul 1996 17:11:58 GMT
Lines: 47
Message-ID: <838746608.16082.7@abwillms.demon.co.uk>
References: <4tgkmh$dk3 AT news DOT enterprise DOT net>
NNTP-Posting-Host: abwillms.demon.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

eurgain AT enterprise DOT net (Alistair Hamilton) wrote:

>I have been following this group for some time, but I have not seen anyone
>asking or talking about printing from a DJGCC program.

>I can deal with printf()ing to stdlst - but that's boring. What I want to know
>is how do I deal with printing graphics - I haven't the foggiest as to where I
>should even start.

This is a big, big, pain in the posterior. Just about every make of
printer uses different codes for graphics. You'll probably have to
make DXEs as printer drivers or something... for bitmap graphics, a
reasonably simple driver interface is one that tells the program:

Print name etc...
Horizontal pixel width
Stripe depth
Vertical pixel depth

Coz the thing in common with bitmapped GFX output is that the printers
like horizontal stripes... 8-pin dotmatrix printers take stripes of 8
pixels depth.

The driver program will call the printer function with each strip,
having split the image into strips internally.

The advantage of having this done by the caller is when the caller is
outputing vector GFX, in which case it can render little strips of the
image (using clipping) and pass them on one at a time, saving the need
to draw a HUGE bitmap and output it bit by bit.

Your printer manual should describe the graphics codes you need to
printf to the printer.

Make sure stdlst is a binary file (Is it anyway? I don't know) because
those graphics may well contain EOFs, CR/LFs, etc.

Regards,


ABW
--
I have become... Comfortably numb...

Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.hardcafe.co.uk/Alaric/">http://www.hardcafe.co.uk/Alaric/</A>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019