easy PAINT question!!

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
User avatar
Captainlazy
Newbie
Posts: 8
Joined: Tue Oct 11, 2005 12:39 pm
Location: UK

easy PAINT question!!

Post by Captainlazy » Sat Oct 15, 2005 5:05 pm

Im trying to use the PAINT function to fill a box on screen.

I know that this code works fine:

SCREEN 12
LINE (100, 100)-(150, 150), 4, B
PAINT (101, 101), 9, 4

BUT... My box is slightly different. Using the LINE:

LINE (616, 194)-(34, 456), 4, B

what does my PAINT code need to be in order to fill the box?? At the moment, all that is happening is that i fill outside the box! I have tried loads and loads of PAINT combinations but my usual trial and error has failed me! please help!!

Kevin

Post by Kevin » Sat Oct 15, 2005 5:36 pm

Try BF instead of B on your line statement...

User avatar
Xerol
Veteran
Posts: 81
Joined: Tue Jan 04, 2005 6:27 pm
Location: Timonium, MD
Contact:

Post by Xerol » Sat Oct 15, 2005 5:43 pm

The BF flag produces a filled box. If you want to still use the normal PAINT statement (which is slower, I think), you need to make sure the point you are painting is inside the box. (101, 101) would be above the box in this case, so it won't work.
If you need music composed in MP3, WAV, or MIDI format, please contact me via email.

Xerol's Music - Updated Regularly!

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sat Oct 15, 2005 5:46 pm

Remember my old sig? The "If only I would have gotton here earlyier" sig?

Well... if only I would have gotton here earlier.
Image

User avatar
Captainlazy
Newbie
Posts: 8
Joined: Tue Oct 11, 2005 12:39 pm
Location: UK

Post by Captainlazy » Sat Oct 15, 2005 7:15 pm

wikid - thanks guys.
This forum is damn good!

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Sun Oct 16, 2005 2:57 pm

hell yeah!
Image

m2j

Post by m2j » Mon Oct 17, 2005 3:13 am

wikid
fork off and never come back.


:wink:


matt

Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re » Mon Oct 17, 2005 6:31 am

m2j wrote:
wikid
fork off and never come back.


:wink:


matt
Uhm?
I have left this dump.

m2j

Post by m2j » Mon Oct 17, 2005 8:48 am

Obviosly that fell flat on it's face... It was meant to be a joke... I know better then to try one like that in future (Mod - feel free to delete above above post...)

matt :oops:

User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} » Mon Oct 17, 2005 3:08 pm

hes new here, be nice... 0_o
Image

Post Reply