Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
paint program, need help
#31
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. Wink

Quote:Click view>settings>Compiler>"...", then find your fb compiler..
Reply
#32
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
Reply
#33
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.
[Image: chav.gif]
Reply
#34
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
Reply
#35
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.
Reply
#36
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.
Reply
#37
which would be done how???
Reply
#38
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
Reply
#39
can you explain how that works, because it doesnt for me and i dont get it
Reply
#40
Try it in FreeBASIC. I don't remember what the stack size is for QB, but I'm sure that will kill it. :lol:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)