Qbasicnews.com

Full Version: The DRAW statement in QB and in FB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I wondered how the graphics statements behaved in QB vs. FB.
I chose SCREEN 12 for this little experiment.
The CIRCLE statement seems to work identically in QB and FB.
For the DRAW statement, I ran this program in QB first:
Code:
SCREEN 12
CLS
DRAW "B H50 R10U10G10"
WHILE INKEY$="":WEND
which draws a small, right triangle up and to the left just 50 pixels from the center of the screen, which is 640 wide by 480 high.

The same program, run in FB, draws the triangle about four times as large, and at the top and left. I got the QB program to match the FB results by using a scale factor of 15 in QB (the default in QB is 4), by changing the DRAS statement to:
[code]DRAW "S15 B H50 R10U10G10"

Curiously, using this new line in FB gives the identical result as not entereing the S15! Could it be that FB uses a default of S15, while QB's is S4?
You might want to post this over on the freebasic.net forum. V1ctor will be ables to answer you.
Hi, RyanKelly, how's Germantown, Gaithersville and Rocklville?

Thanks for the freeBasic tip, I will proceed to do so. Ralph
When Antoni sees this posts, I'm sure he'll provide good info. AFAIK there was a long discussion about DRAW - I think to remember that the scales were different, or something like that.

Antoni? Smile
It's solved in v 0.16, thanks to George C. Scott and lillo. Big Grin
If you don't want to update yet, just add a DRAW "S4" before any other DRAW line. It will solve the problem in FB and won't harm in QB.
Quote:Hi, RyanKelly, how's Germantown, Gaithersville and Rocklville?

Thanks for the freeBasic tip, I will proceed to do so. Ralph

Different everyday. Even the roads move.