Posts: 1,774
Threads: 62
Joined: Aug 2003
If you don't have a folder called FreeBASIC, download it here, and install it.
After installing it, run FBIDE and do what Aga said. Everything should work fine after that.
Quote:Click view>settings>Compiler>"...", then find your fb compiler..
Posts: 488
Threads: 19
Joined: Sep 2005
thanks for the link, now here is a quick question, you know how in MS Paint you can fill and any adjacent pixels of the same color are also filled, how would i go about doing that, using x% and y% as the coordiantes and colour% as the color
Posts: 484
Threads: 14
Joined: Apr 2005
you've asked quite a biggie there, there are lots of different ways
heres a post i remember
http://forum.qbasicnews.com/viewtopic.php?t=10992
this one has a way using PAINT
http://forum.qbasicnews.com/viewtopic.ph...light=fill
but do a search for others, cause there are more hidden on the forum
EVEN MEN OF STEEL RUST.
Posts: 488
Threads: 19
Joined: Sep 2005
well thnx for the help, i dont understand anything on the 1st link and the 2nd one is a link to a topic i am already checking, my problem is more of filling a area when it's boundries aren't all the same color
Posts: 3,368
Threads: 195
Joined: Jan 2003
Ya.
You use POINT and PSET with traditional QB commands. You do a recursive or iterative search starting from the initial point until you hit a color that isn't the color you're filling.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 3,368
Threads: 195
Joined: Jan 2003
So the answer is QB (nor FB, afaik) does not have a native paint function that does as MSPaint does.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 488
Threads: 19
Joined: Sep 2005
which would be done how???
Posts: 1,774
Threads: 62
Joined: Aug 2003
Can you explain how this works? You'll never get anywhere, if you don't slow down and think.
Code: Declare Sub FloodFill(X, Y, Col)
Screen 13,,,1
Randomize Timer
Circle(160,100),50,31
For i=1 To 10
tAng!=Rnd*6.282
Tx=160+30*Sin(tAng!)
Ty=100+30*Cos(tAng!)
Circle(Tx,Ty),10,2+Int(rnd*14)
Next
FloodFill 160,100,1
Sleep
Sub FloodFill(X,Y,Col)
If Point(X,Y)>0 Then Exit Sub
Pset(X,Y),Col
FloodFill(X-1,Y,Col)
FloodFill(X+1,Y,Col)
FloodFill(X,Y-1,Col)
FloodFill(X,Y+1,Col)
End Sub
Posts: 488
Threads: 19
Joined: Sep 2005
can you explain how that works, because it doesnt for me and i dont get it
Posts: 1,774
Threads: 62
Joined: Aug 2003
Try it in FreeBASIC. I don't remember what the stack size is for QB, but I'm sure that will kill it. :lol:
|