Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
fill the background???
#1
can u just fill the background or even add a gradiant fill as the background, screen 13 by the way(320x200)
Reply
#2
To fill the whole background in a plain colour, check out the PAINT command in the QB help.

To make a gradient, you have to work it out. Just use a FOR/NEXT loop and draw horizontal or vertical lines with different colours in sequence. Which colours to use depends on how the palette is arranged, which depends of course on which palette you are using. The original SCREEN 13 palette is horrid and doesn't have very gradients.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
i chked the paint topic in the help, but im not really sur exactly how to put it
Reply
#4
PAINT (x, y), colour, boundary

If will flood-fill from (x, y) using colour and stoping by lines which are of "boundary" colour.

omitting "boundary" it won't stop, so a

Code:
CLS
PAINT (0,0), 1

Will paint the whole screen in dark blue.

This thing will draw a triangle in green:

Code:
LINE (160,0) - (60, 199), 2
LINE (160, 0) - (260, 199), 2
LINE (60, 299) - (260, 199), 2

If you place a

Code:
PAINT (160,100), 4, 2

below the above code, the triangle will get filled in red (4). PAINT will stop at green (2) lines.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#5
well i know how a fill works, its just i the help part of qb, the paint has all these sqr brackets and setuff, but thnx for this help, also, when i put it in my code, every time it has to refill the background, it goes blk for a very short while, kinda like a flicker, can thet be stopped :???:
Reply
#6
For an explanation of the square brackets stuff check this page
(or the same place in qb's built in help system)
/post]
Reply
#7
wel ok, i guess there ok now, well thnx
Reply
#8
Gah..

"They're", not "there".
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
#9
well i figured out ow to get the GET/PUT to work so im fine now, thnx for all da help
Reply
#10
ok, now on the patin topic, now heres a new problem, can the paint command be used like the fill option in MS Paint, so it fills all of 1 color so lets say u had a design like the following:

B, R, R, R, R, G
B, B, R, B, B, G
G, B, B, B, G, R

can u just fill the Blue part, without filling the Red or Green, also in the program im making, all 256 colors are available
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)