Qbasicnews.com

Full Version: QBGFX
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can't seem to get programs that use qbgfx to compile in v0.09b. Not even the example program. Any tips?
What is the error you get while trying to compile?

May it be that you're not linking with SDL? You have to do
Code:
fbc myprog.bas -l sdl
Since GFXlib uses SDL as a backend.
aha! didn't know that :oops: . Is there a way to get it fullscreen or is that limited to directx apps?
Quote:Is there a way to get it fullscreen or is that limited to directx apps?
Code:
SCREEN 800, 600, 32, 1
ahhh. nice. I don't suppose you'd be interested in a slightly better circle routine? It seems to make a cleaner circle.
Code:
sub circle (centre_x as integer, centre_y as integer, radius as integer, colour as integer = 255)
dim y as integer
dim x as integer
for x = -radius to radius step 1
y = sqr((radius^2)-(x^2))
pset (x+centre_x,y+centre_y),colour
pset (x+centre_x,-y+centre_y),colour
pset (y+centre_x,x+centre_y),colour
pset (-y+centre_x,x+centre_y),colour
next x
end sub
Code:
I don't suppose you'd be interested in a slightly better circle routine?
Yeah I know. I used the ellipse code from the SDL_gfx library (it's also LGPL), and it leaves gaps in the ellipse sometimes. It's going to have to be replaced with one that's acceptably accurate (like the one you posted), but it also needs to be able to do elliptical arcs/pie-slices which I don't know how to do at a decent speed.
Quote:ahhh. nice. I don't suppose you'd be interested in a slightly better circle routine? It seems to make a cleaner circle.
That's Bresenham's algorithm. I use it in PTCXL. Big Grin
Is it possible to swtch qb'ish gfx completely -say to have those keywrods, like screen and etc for other uses?