Qbasicnews.com

Full Version: Primitive Graphics Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What gives? This should give a nice, small circle in the middle of the screen, but instead it has a radius that much too large.

Code:
SCREEN 18,32

WINDOW (-10,10)-(10,-10)

CONST PI = 3.1415926535897932385

CONST WHITE   = RGB (255, 255, 255)
CONST BLACK   = RGB (0,   0,   0)
CONST BLUE    = RGB (0,   0,   255)
CONST RED     = RGB (255, 0,   0)
CONST GREEN   = RGB (0,   255, 0)
CONST YELLOW  = RGB (255, 255, 0)
CONST ORANGE  = RGB (255, 128, 0)
CONST BROWN   = RGB (128, 42,  42)
CONST PURPLE  = RGB (255, 0,   255)

COLOR WHITE, BLACK

CLS

LINE (-10, 0) - (10, 0), RED
LINE (0, -10) - (0, 10), RED
CIRCLE (0, 0), 1
SLEEP

This is what I get, fullscreen or windowed

[Image: fb_prob.jpg]
Works as expected. Ie.

Code:
WINDOW (-10,10)-(10,-10)
But I thought that the Window command basicly 'rescaled' the screen so that the upper left hand corner would be the point (-10,10) and the lower right hand point would be (10,-10).... a standard Cartesian plane.

If this is the case, that circle is 10x to big. Its radius is only 1 (one) yet its being drawn as if it were 10.

Am I missing something?

EDITED: This is what I get in QB and VB (the capture is VB). Notice the lines are correct here too (as opposed to above). If this is something that is already known about, I am sorry to bring it up again.

[Image: qbvb_correct.jpg]
Ok, there was really a bug here; I've fixed it, corrected version is in CVS.
Ok, this may be stupid but.... what do you mean, its in CVS.

Does that mean that it will be in the next version or does it mean that we (non-developers) can go to SourceForge and get updated code now?

Any any case, thanks mate
Quote:Ok, this may be stupid but.... what do you mean, its in CVS.

Does that mean that it will be in the next version or does it mean that we (non-developers) can go to SourceForge and get updated code now?

Hi:

Sourceforge uses CVS (Concurrent Versioning System) to manage projects where different developers are working on different sections of the source code for a program. It is very useful because it automatically keeps a history of changes that can be rolled back if necessary.

Only project approved developers can upload changes, but anybody can download the latest source code and try it out for themselves. The problem is that setting up your computer to download the files is not so easy if you have never done it before. And when you do get the source code, it might not compile for you unless you understand the tool set needed to rebuild everything, and can read, understand and correct the error messages.

You can download the changelog.txt easily from a web browser to see what has been implemented.

Unless you are really determined to learn, and are ready for some pain, stop reading here.

This is what you need to use CVS:
1)
You need to get and install a free program called TortoiseCVS. You need to study at least Section 1 and 2 of the help file of this program.
2)
You will need to download and install the MinGW C++ compiler and know or learn how to compile C libraries using it.
3)
You will need to find a copy of make.exe that has been adapted to the Win32 operating system. You might have to re-build the source code of make.exe.
4)
You need to study the FreeBASIC CVS file structure on Sourceforge and figure out what commands TortoiseCVS needs to download the latest update (not so easy if you have never done this before).
5)
You will need to find and download DirectX headerfiles and libraries developed for MinGW.
6)
You might have to hand edit the makefile for the compiler because it uses relative paths that are not understood by any version of make I have found (there must be some out there that work properly?). I needed to double up the backslashes for the relative paths to fbc.exe and ld.exe, while leaving all the command line arguments that are passed to these programs untouched.
7)
You will need to edit your path environmental variable so that make.exe can find the gcc compiler when building lib’s.
8)
Finally in the latest release of fbc source code, variable length arguments were added to the compiler, and then implemented in the runtime library and the header files updated. So now the old compiler cannot compile the new source without hand editing, or incremental changes from an older version to the new version. Good luck with this.

Welcome to CVS.

Garvan
or you could just hangour at #badlogic on efnet and ask victor for the newest version of FB and lillo for a fixed gfx lib Smile