Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GFXlib "DRAW" command
#1
Trying do do a simple command with the DRAW function...

Code:
SCREEN 12
DRAW "C15 BM100,100 L5E5F5L5"
sleep

It should go to position 100, 100 and draw a simple triangle, but I am not seeing anything on the screen. I have tried various commands, but can't seem to get any screen/draw combinations to work
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Reply
#2
Spaces inside the commands string aren't supported: the routine thinks they are unknown commands, so it exits without drawing anything. Actually I didn't even know QB was supposed to accept spaces, I missed it from the QB DRAW inline documentation.

I've now made it accept space and tab characters; new version in CVS. Until new version is out, just remove spaces from your string and it'll work as it should.
ngelo Mottola - EC++
Reply
#3
Thanks.
I thought I had tried that (no spaces), but apparently I did not.

Works great!
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Reply
#4
Actually your example led me to discover there were rounding errors in DRAW... infact your triangle has bad corners. Now fixed in CVS.
ngelo Mottola - EC++
Reply
#5
Wow... DRAW support. I thought I'd never see the day when that old thing gets put back into the mainstream Smile
Reply
#6
Quote:Now fixed in CVS.

Any chance on getting a pre-compiled lib for download to replace the one in 0.11 without having to re-compile source?
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Reply
#7
you have to wait at least tomorrow... I'm in the middle of big internal changes in the win32 side of things, adding a GDI driver alongside the existing DirectX one, for systems where DX is not installed.
ngelo Mottola - EC++
Reply
#8
No problem.

In the meantime, here is a little "fun with DRAW" for others to enjoy:
[Image: test.GIF]
The source for this "demo" is located here:
testshipslide.bas

This is just "playing around" code and is not a complete anything. However, I would like to know if others see the odd "warping effect" when either the player or the target slides across the center of the screen. I wonder if its the GFXlib, or if its my video card...
ature has its way of warning a person away from danger: The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
Reply
#9
I tried that and then I tried ALT+Enter to get fullscreen mode....
That made something like an endless loop, the mousecurser was flickering, so I stopped the program with Ctrl+Alt+Delete...
Mipooh
Reply
#10
I didn't see the weird warping effect. It just has a couple of odd placed pixels when I go full-screen. That's the same thing QB did. It's pretty funny though... reminds me of Atari 2600.

:lol:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)