This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-10-25 03:41:40

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Fill

Im busy making a paint app and was wondering if anyone knows how to make a fill colour? I thought about using 2 sprites using colour sencing but its way to glitchy! and help would be great

Offline

 

#2 2008-10-25 05:07:06

deerel
Scratcher
Registered: 2008-08-23
Posts: 89

Re: Fill

You mean this?
http://scratch.mit.edu/projects/deerel/278905

Offline

 

#3 2008-10-25 07:46:49

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Offline

 

#4 2008-10-30 07:47:51

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Offline

 

#5 2008-10-30 08:08:56

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Fill

yambanshee wrote:

so no one can help me?

Well...I wrote a fill routine.  But it is too slow to be useful.  Unless you run it in Jens BYOB version of Scratch, then it works fairly well.  Filling takes a lot of computation so it is hard to do quickly in Scratch.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2008-10-30 08:09:01

Helping_You
Scratcher
Registered: 2008-10-30
Posts: 6

Re: Fill

You could do it so that you have a single sprite, which goes in straight lines a long the screen, going:

<repeat until><touching color[ blue ]
<set pen color to( blue )
<move( 1 )steps>
<end>

and then go back and forth.

Tell me if you don't understand.


Check out my tutorials:
Helping_You Tutorials

Offline

 

#7 2009-01-02 01:39:15

Bargonaut
Scratcher
Registered: 2007-11-05
Posts: 6

Re: Fill

Here is a sample application that performs a flood fill algorithm.
It is fairly complicated, and quite slow, but it works very well.

http://scratch.mit.edu/projects/Bargonaut/368844

-BS

Offline

 

#8 2009-01-03 04:30:20

Nikimax
Scratcher
Registered: 2008-06-22
Posts: 36

Re: Fill

http://scratch.mit.edu/projects/Nikimax/285198
This is my fill implementation. It is glitchy, but provides full fill;


http://scratch.mit.edu/projects/Nikimax/291754
Test yourself=)

Offline

 

#9 2009-01-04 07:40:35

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Fill

Helping_You wrote:

You could do it so that you have a single sprite, which goes in straight lines a long the screen, going:

<repeat until><touching color[ blue ]
<set pen color to( blue )
<move( 1 )steps>
<end>

and then go back and forth.

Tell me if you don't understand.

wont work good enough, the shape wont always be sqaure

Offline

 

#10 2009-01-04 07:44:46

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Fill

never mind guys, there is no real way ofdoing this without it being painfully slow, and/or extreamly buggy. paint 9 is out if you want to view it but no fill fetuer

Offline

 

Board footer