i have the following problem:
my program is using vga 640x480x16 mode (bgi-driver of borland) and i
have to make a hardcopy of that screen to a epson-printer.
is there anyone who could give me a hint how to do it or has anyone a
routine for that ?
Thanks for your help
Greetings
Bjoern
<sti...@andrive.de>
You must every pixel copy to printer, that's is not good.
(*****)
unit PrintOps;
Interface
Procedure Hardcopy;
Implementation
USES Crt,Printer,Graph;
Procedure Hardcopy;
VAR block : Integer;
zeile,i : Word;
muster : Array[0..480] Of Byte;
ch : Char;
maxx, maxy : Integer;
Procedure BlockMuster(block:Word);
VAR col :Byte;
zeile,spaltbit:Integer;
Begin
For zeile:=0 TO maxY DO Begin
muster[zeile]:=0;
For spaltbit:=0 TO 7 DO Begin
col:=GetPixel(8*block+spaltbit,zeile);
IF col<>globvar._col THEN muster[zeile]:=muster[zeile] Or (1 Shl
spaltbit);
End;
End;
End;
Begin
maxx:=getmaxX; maxy:=getMaxY;
For zeile:=0 TO maxY DO muster[zeile]:=0;
{$I-}Write(Lst,#27,#74,#24);{$I+}
For block:=maxX Div 8 DOWNTO 0 DO Begin
BlockMuster(block);
Write(Lst,#27,'K',Chr(Lo(maxY+1)),Chr(Hi(maxY)));
For zeile:=0 TO maxY DO Write(Lst,Chr(muster[zeile]));
Write(Lst,#13#27#74#24);{epson! #27#74#31 for nec and #27#74#24 for
fuji}
End;
Write(Lst,#12);
End;
End.
(*****)
Better you take a Printer-BGI-Driver from a Shareware-Suite. The most of
them
can print Epson/HP/Fujitsu...