Thanks Walt,
output on your PC is what I would expect.
I will send report to PB tomorrow.
Petr
Announcement
Collapse
No announcement yet.
Bitmap New/Graphic Window
Collapse
X
-
Thanks, Chris. I thought that was the way it worked, but wasn't sure.
Leave a comment:
-
Hi,
I must admit I am little bit confused here.
Try following code:
Code:#COMPILE EXE #DIM ALL FUNCTION PBMAIN () AS LONG ' Create and show a Graphic window on screen LOCAL hWin AS DWORD LOCAL hBmp AS DWORD LOCAL sBits AS STRING GRAPHIC BITMAP NEW 130, 130 TO hBmp GRAPHIC WINDOW "Box", 300, 300, 130, 130 TO hWin GRAPHIC ATTACH hWin, 0 GRAPHIC BOX (0, 0) - (130, 130), 0, %WHITE, %RED SLEEP 1000 ' show it for 5 seconds, then end GRAPHIC GET BITS TO sBits MSGBOX "Window resolution"+STR$(CVL(sBits,1))+STR$(CVL(sBits,5)) GRAPHIC ATTACH hBmp, 0 GRAPHIC GET BITS TO sBits MSGBOX "Bitmap resolution"+STR$(CVL(sBits,1))+STR$(CVL(sBits,5)) GRAPHIC BITMAP END GRAPHIC ATTACH hWin, 0 GRAPHIC WINDOW END END FUNCTION
On my PC the box is rendered completely, nothing is missing.
Let me know if it is just my PC ( PowerBASIC for Windows, 8.04 ) or feature.
PetrLast edited by Petr Schreiber jr; 13 Jul 2008, 08:47 AM.
Leave a comment:
-
If it works the same as the API, then a bitmap which is 80 x 80 would have coordinates:
X - 0 to 79
Y - 0 to 79
when drawing, unless you change the viewport (which most don't).
Leave a comment:
-
Bitmap New/Graphic Window
When defining a memory bitmap or a graphic window the width and height are specified, e.g.
BITMAP NEW 80, 80 TO BmpHndl
GRAPHIC WINDOW "", 0, 0, 80, 80 TO WinHndl
Does the width/height parameters define the bmp/graphic window from 0 (zero) to width/height or from 0 (zero) to width/height - 1?Tags: None
Leave a comment: