Board index » off-topic » BP7 Graphics

BP7 Graphics


2005-05-27 09:04:03 AM
off-topic19
Is my assumption correct that there is no way to fully do even simple
graphs, with BP7, on the newer screens? I can still do that perfectly on a
CRT with XP, and an older laptop with Win95.
Actually, on my new widescreen XP laptop, the graphs are close to perfect,
except some characters in titles, scales, etc. are ineligible, but mostly
the characters are OK, and the graph, tics, etc. is 100%. It's so close,
that I believe there may be a way to fix the small problems.
I'm not concerned with printing the graphs as I send that to a disk file,
then import to a Delphi program.
Any one have ideas?
Thanks
 
 

Re:BP7 Graphics

In the obscure news:429672cc$ XXXX@XXXXX.COM ,
Someone calling himself bfdeleen
suspiciously hiding as < XXXX@XXXXX.COM >uttered:
Quote
Is my assumption correct that there is no way to fully do even simple
graphs, with BP7, on the newer screens? I can still do that perfectly
on a CRT with XP, and an older laptop with Win95.

Actually, on my new widescreen XP laptop, the graphs are close to
perfect, except some characters in titles, scales, etc. are
ineligible, but mostly the characters are OK, and the graph, tics,
etc. is 100%. It's so close, that I believe there may be a way to fix
the small problems.

I wrote a very nice graphing routine long time ago. With thin and/or fat
ticks, lines, fonts, colors, legends, autoscaling etc,etc....
Quote
I'm not concerned with printing the graphs as I send that to a disk
file, then import to a Delphi program.

in vga mode, you can copy the graphic screen to the windows clipboard in
order
Quote
Any one have ideas?
There are some bugs in the egavga.bgi. E.g. on some systems not all the
numbers of the default font are available.
Normally all new computers support the VGA standard (640x480x16 colors).
This is also usually what you get when you start a computer in safe mode.
If you want to do graphs on newer systems, using higher pixel definitions
and a larger number of colors you'll have to find a replacement .bgi file.
You can find an svga driver that works on most systems in real and
protected mode up to 256 colors on
www.tank-cleaning.demon.nl/pasfiles/svga.zip
It does not support widescreen resolutions.
A commercial driver can be bought at
www.ryledesign.com
I don't know if they have a widecreen version yet.
 

Re:BP7 Graphics

sorry
Quote
I'm not concerned with printing the graphs as I send that to a disk
file, then import to a Delphi program.

in vga mode, you can copy the graphic screen to the windows clipboard
using alt+PrtScr.
After that you can paste it in any program supporting bitmaps.
 

{smallsort}

Re:BP7 Graphics

I used to be able to do that up to Win98, but never with XP, on any
computer, regardless of screen hardware. Your svga file, mode 5 (vga
640x480x16 colours), resulted in a perfect graph screen for all items. Also
on my widescreen laptop. But still no success with copying to XP windows
clipboard, for the DOS program, in protected mode,.with either desktop crt
or laptop widescreen.
With a dos text screen, copying to clipboard works as text, readable by
notepad. Alt+enter puts a window and the text screen is now a graphic
screen which can be copied to the clipboard, but now as a graphic file.
However, when a graph is displayed, in graphics mode by programming
(InitGraph), only the full screen is possible, and copying to clipboard
impossible as above.
Since you can do that copying, it must be a simple setting or programming
problem.
Thanks for the help
"F Verbeek" <fv [at] tcenl [dot] com>wrote in message
Quote
sorry

>I'm not concerned with printing the graphs as I send that to a disk
>file, then import to a Delphi program.
>
in vga mode, you can copy the graphic screen to the windows clipboard
using alt+PrtScr.
After that you can paste it in any program supporting bitmaps.

--
Femme Verbeek


 

Re:BP7 Graphics

In the obscure news:429b6b74$ XXXX@XXXXX.COM ,
Someone calling himself BF Deleen
suspiciously hiding as < XXXX@XXXXX.COM >uttered:
Quote
I used to be able to do that up to Win98, but never with XP, on any
computer, regardless of screen hardware. Your svga file, mode 5 (vga
640x480x16 colours), resulted in a perfect graph screen for all
items. Also on my widescreen laptop. But still no success with
copying to XP windows clipboard, for the DOS program, in protected
mode,.with either desktop crt or laptop widescreen.

With a dos text screen, copying to clipboard works as text, readable
by notepad. Alt+enter puts a window and the text screen is now a
graphic screen which can be copied to the clipboard, but now as a
graphic file. However, when a graph is displayed, in graphics mode by
programming (InitGraph), only the full screen is possible, and
copying to clipboard impossible as above.

Since you can do that copying, it must be a simple setting or
programming problem.

I don't think it can be solved easily. The alt+ptrscr works only in
640x480x16 mode, because windows 98 supports it. Aparently XP does not.
If it is of any help, I do have a screendump routine, that dumps the
entire graphic screen (after initgraph) to a .bmp file with a unique name.
It does other resolutions and colors as well. Let me know if you need it.
 

Re:BP7 Graphics

Yes, I would love to have that screendump.
Thanks for all the help.
"F Verbeek" <fv [at] tcenl [dot] com>wrote in message
Quote
In the obscure news:429b6b74$ XXXX@XXXXX.COM ,
Someone calling himself BF Deleen
suspiciously hiding as < XXXX@XXXXX.COM >uttered:
>I used to be able to do that up to Win98, but never with XP, on any
>computer, regardless of screen hardware. Your svga file, mode 5 (vga
>640x480x16 colours), resulted in a perfect graph screen for all
>items. Also on my widescreen laptop. But still no success with
>copying to XP windows clipboard, for the DOS program, in protected
>mode,.with either desktop crt or laptop widescreen.
>
>With a dos text screen, copying to clipboard works as text, readable
>by notepad. Alt+enter puts a window and the text screen is now a
>graphic screen which can be copied to the clipboard, but now as a
>graphic file. However, when a graph is displayed, in graphics mode by
>programming (InitGraph), only the full screen is possible, and
>copying to clipboard impossible as above.
>
>Since you can do that copying, it must be a simple setting or
>programming problem.
>
I don't think it can be solved easily. The alt+ptrscr works only in
640x480x16 mode, because windows 98 supports it. Aparently XP does not.
If it is of any help, I do have a screendump routine, that dumps the
entire graphic screen (after initgraph) to a .bmp file with a unique name.
It does other resolutions and colors as well. Let me know if you need it.

--
Femme Verbeek


 

Re:BP7 Graphics

"bfdeleen" < XXXX@XXXXX.COM >schreef in bericht
Quote
Yes, I would love to have that screendump.

I just remembered that it takes the rgb values of the first 16 colors
only.
For 256 colors it needs some modification.
regards
Femme Verbeek
unit graphbmp;
interface
Procedure GrafToBMP16; {16 color BMP}
implementation
uses dos,graph;
Type
ColorType = Record
blue: Byte;
Green: Byte;
red: Byte;
Reserved: Byte;
End;
Procedure GETRGB ( Col: Byte; Var RGB: colortype );
Var
RGB_: colortype;
Begin
Asm
Mov Ah, $10;
Mov Al, $15;
Mov Bl, Col;
Int $10
Mov RGB_.Red, Dh;
Mov RGB_.Green, Ch;
Mov RGB_.Blue, Cl;
End;
RGB:=RGB_;
End;
Const BMPnum:Integer=-1;
Procedure InitGraf2BMP;
Var X,Y,I : Integer;
FN : PathStr;
SR : SearchRec;
T : Text;
Begin
BMPnum := 0;
FindFirst('SCRX????.BMP',Archive or ReadOnly,SR);
while DOSerror=0 do
Begin
FN := Copy(SR.Name,5,4);
Val(FN,X,Y);
if Y=0 then
if X>= BMPnum then
BMPnum := X+1;
FindNext(SR);
End;
End;
Procedure GrafToBMP16; {16 color BMP}
Const BMPhead:Array[0..53] of Byte=
($42,$4D,$16,$6A,$02,$00,0,0,0,0,$76,0,0,0,$28,0,0,0, {no graphix}
$80,$02,0,0, {bmpsize x}
$E0,$01,0,0, {bmpsize y}
$01,0, {bits per plane}
$04,0, {bits per pixel}
0,0,0,0, {bitompression}
0,0,0,0, {imsize}
0,0,0,0, {resolution x}
0,0,0,0, {resolution y}
$10,0,0,0, {colors used}
0,0,0,0 {colorsimportant}
);
Var written,X,Y : Integer;
F : File;
FN : PathStr;
B : Array[0..800] of Byte;
iclr:byte;
bgr:colortype;
Begin
Str(BMPnum:4,FN);
for X := 1 to 3 do
if FN[X]=' ' then
FN[X] := '0'; {fill blanks ->'0'}
Inc(BMPnum);
FN := 'SCRX'+FN; {construct filename}
FN := FN+'.BMP';
Assign(F,FN);
Rewrite(F,1);
bmphead[18]:=lo(getmaxx+1);
bmphead[19]:=hi(getmaxx+1);
bmphead[22]:=lo(getmaxy+1);
bmphead[23]:=hi(getmaxy+1);
BlockWrite(F,BMPhead,sizeof(BMPhead),written);
for iclr:=0 to 15 do
begin
getrgb(iclr,bgr);
bgr.blue:=bgr.blue * 4;
bgr.green:=bgr.green * 4;
bgr.red:=bgr.red * 4;
bgr.reserved:=0;
blockwrite(F,bgr,sizeof(bgr),written);
end;
For Y := getmaxy downto 0 do
Begin
for X := 0 to getmaxx div 2 do
B[X] := GetPixel(X*2+1,Y) OR
GetPixel(X*2,Y) shl 4 ; {constuct color bytes
of 2 pixels each}
BlockWrite(F,B,(getmaxx+1) div 2,written);
End;
Close(F);
End;
begin
InitGraf2BMP;
end.