Discuss Scratch
- Scratch-Minion
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
For pen drawing projects, I would like to see a Fill block in Scratch.
There is a SNAP Fill block that fills an area in the current pen color, starting at the current sprite position. (ie. it has no inputs).
The Scratch Fill block could also have no inputs,
or it could have X and Y Position inputs saying where the fill should start. eg. fill 100 100
Supplying a Fill block would allow easier creativity for pen drawing projects. (A fill algorithm is difficult to write).
Also a native fill in Scratch is likely to be faster, so more useful in Scratch.
I would not expect the Fill block to be available when Scratch 3.0 is released, but would love to see it added later.
* When I think more about it, this may not be too hard to add as the code must already exist in the Scratch Costume Editor.
There is a SNAP Fill block that fills an area in the current pen color, starting at the current sprite position. (ie. it has no inputs).
The Scratch Fill block could also have no inputs,
or it could have X and Y Position inputs saying where the fill should start. eg. fill 100 100
Supplying a Fill block would allow easier creativity for pen drawing projects. (A fill algorithm is difficult to write).
Also a native fill in Scratch is likely to be faster, so more useful in Scratch.
I would not expect the Fill block to be available when Scratch 3.0 is released, but would love to see it added later.
* When I think more about it, this may not be too hard to add as the code must already exist in the Scratch Costume Editor.
Last edited by Scratch-Minion (June 25, 2018 23:12:32)
- Wahsp
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
I have a feeling this might be a duplicate, but this is definitely something we need
- Scratch-Minion
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
I have a feeling this might be a duplicate, but this is definitely something we need
I have looked in the suggestions stickies.
It is not listed under “the list of suggestions”.
It is not listed under “rejected suggestions”.
I did a search on the forums and there has been a couple of similar suggestions, but none recently and not too much said on them.
Maybe this has been skipped over as it is not a rejected suggestion.
I have added to my post above that the code to implement this must already exist in the Scratch Costume Editor.
- Sheep_maker
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
On the suggestions forums, it doesn't matter how old a topic is; if the suggestion hasn't been implemented, it's still relevant, and can be bumped with a I did a search on the forums and there has been a couple of similar suggestions, but none recently and not too much said on them.constructive post.
Generally, the convention is to keep the oldest topic, regardless of the number of posts.
- Scratch-Minion
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
On the suggestions forums, it doesn't matter how old a topic is; if the suggestion hasn't been implemented, it's still relevant, and can be bumped with a I did a search on the forums and there has been a couple of similar suggestions, but none recently and not too much said on them.constructive post.
Generally, the convention is to keep the oldest topic, regardless of the number of posts.
Maybe I was a bit hasty saying there were similar suggestions.
I have looked back at the old posts again and find that they do not match very well.
The closest post I could find is one mainly about a suggestion for drawing ellipses with a secondary topic about filling shapes (referring to ellipses etc rather than a general fill) https://scratch-mit-edu.ezproxyberklee.flo.org/discuss/topic/205120/
I did search before posting and didn't find a suitable match.
- gosoccerboy5
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Necropost!!! 
Support! I think a block such as a

Support! I think a block such as a
fill x:() y:() x:() y:() x:() y:() @delInput @addInput :: penwould be nice because right now I think people have to use tricky workarounds that cause lag in order to fill triangles and other polygons especially for 3D. I'm no expert, and I may be wrong on these statements but I think it would still make life a lot easier for people who need to fill polygons.
- gosoccerboy5
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Bump, because this topic is getting no attention
- gosoccerboy5
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
K, yell at me if there's a dupe for this, but lemme just bump another time. 3D rendering requires a lot of triangle filling (I think) and a built in algorithm would make things a lot easier (and probably faster too)
Last edited by gosoccerboy5 (Dec. 2, 2020 15:55:28)
- sathvikrias
-
500+ posts
A Fill block in Scratch 3.0 (a pen block)
bump
and support, since It would be helpful for a project I want to make.
and support, since It would be helpful for a project I want to make.
Last edited by sathvikrias (Dec. 16, 2020 16:18:19)
- randomsketchartist
-
57 posts
A Fill block in Scratch 3.0 (a pen block)
bump
this would be helpful for multiple projects that I want to make, needs more attention
this would be helpful for multiple projects that I want to make, needs more attention
- gosoccerboy5
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Bump. the usefulness of this suggestion has not dropped
- Steve0Greatness
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Support
here's how the block should look
edit, I forgot that I had to do “:: pen”
here's how the block should look
fill x:() y:() to x:() y() with color [#94e9b4] :: pen
edit, I forgot that I had to do “:: pen”
Last edited by Steve0Greatness (Jan. 11, 2021 18:14:21)
- IndianRuby718
-
100+ posts
A Fill block in Scratch 3.0 (a pen block)
I am so mad at myself because I was planning to bump this topic days ago with my input steyxtrsjxdcx
So basically filling shapes like in bitmap, as long as they're the same color. Two overlapping shapes of the same color would get filled like they're one. But then there's the problem with gradients/shading. That would probably work like bitmap too, where it just fills that one line of the same color with a new color.. (or it could possibly detect if the color change is subtle enough to still be considered one shape? ..probably not :P) And the resulting pen shapes would stay, even when sprites move and things change. It's pen :P
There could also be another block like this:
The block mentioned in other posts with multiple coordinates could be worked around by just outlining the shape and then using the basic fill block inside it.
And another idea:
________________________
After thinking a bit I realized that there's other possibilities for how it would fill shapes.. would it take everything in the player into account, or only any drawn pen? If so, would it fill any created shape, filled or empty, or only already filled shapes to just a different color? I think the best way to implement this is probably by taking everything into account, like I originally interpreted.. it wouldn't bother 100% pen projects either, since you'd just have one sprite and a solid backdrop.
________________________
Looking at the OP again, it did say either no inputs or one set or coordinates, so I guess that's what they meant in the first place :P
If you didn't read all of that, here are the two blocks I'm supporting:
Written from memory, since I had this typed out but then I azetyhxfhxfjxaaaaaaaa messed up again ._.
Post 398…
I thought this suggestion was about a block like this: Support! I think a block such as afill x:() y:() x:() y:() x:() y:() @delInput @addInput :: penwould be nice because right now I think people have to use tricky workarounds that cause lag in order to fill triangles and other polygons especially for 3D. I'm no expert, and I may be wrong on these statements but I think it would still make life a lot easier for people who need to fill polygons.
fill currently touching shape :: penAnd it would fill the shape created by the various objects on the stage the center of the sprite is over, taking everything in the player into account. So if it was over a circle sprite it would fill that circle with pen. If there were no sprites behind it but a triangle in the backdrop it would fill that triangle. If it was over the circle sprite again but this time another sprite was blocking part of it, now it would only fill the part of the circle that's showing, under the center of the sprite.
So basically filling shapes like in bitmap, as long as they're the same color. Two overlapping shapes of the same color would get filled like they're one. But then there's the problem with gradients/shading. That would probably work like bitmap too, where it just fills that one line of the same color with a new color.. (or it could possibly detect if the color change is subtle enough to still be considered one shape? ..probably not :P) And the resulting pen shapes would stay, even when sprites move and things change. It's pen :P
There could also be another block like this:
fill shape at x:( ) y:( ) :: penwhich would do the same as the first one, but at any given coordinate, instead of just the sprite's. So if this were the chosen block instead you could do more, and still be able to use the sprite's coordinates if needed. But all of the pen blocks only use the sprite's coordinates and nothing else, which is why I'm not sure about this. We might as well have a block like this:
move pen to x:( ) y:( ) :: penand disconnect it from the sprite ._.
The block mentioned in other posts with multiple coordinates could be worked around by just outlining the shape and then using the basic fill block inside it.
And another idea:
erase currently touching shape :: penDoes the same as the basic fill block, but with the eraser. This would be somewhat helpful for specific erasing.. [though not as much as a real eraser function]
________________________
After thinking a bit I realized that there's other possibilities for how it would fill shapes.. would it take everything in the player into account, or only any drawn pen? If so, would it fill any created shape, filled or empty, or only already filled shapes to just a different color? I think the best way to implement this is probably by taking everything into account, like I originally interpreted.. it wouldn't bother 100% pen projects either, since you'd just have one sprite and a solid backdrop.
________________________
Looking at the OP again, it did say either no inputs or one set or coordinates, so I guess that's what they meant in the first place :P
If you didn't read all of that, here are the two blocks I'm supporting:
fill currently touching shape :: pen // what the OP meant, I'm pretty sure :PThat's pretty much it :P
erase currently touching shape :: pen // my addition
Written from memory, since I had this typed out but then I azetyhxfhxfjxaaaaaaaa messed up again ._.
Post 398…
- gosoccerboy5
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Yeah, I thought a poly fill algorithm would be cooler so I kinda derailed a tiny bit
- gosoccerboy5
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Sorry, you're probably right that I was understanding it incorrectly. Could anyone link me to a suggestion about being able to fill a polygon automatically?I thought this suggestion was about a block like this: Support! I think a block such as afill x:() y:() x:() y:() x:() y:() @delInput @addInput :: penwould be nice because right now I think people have to use tricky workarounds that cause lag in order to fill triangles and other polygons especially for 3D. I'm no expert, and I may be wrong on these statements but I think it would still make life a lot easier for people who need to fill polygons.fill currently touching shape :: pen
- 10goto10
-
500+ posts
A Fill block in Scratch 3.0 (a pen block)
For pen drawing projects, I would like to see a Fill block in Scratch.
There is a SNAP Fill block that fills an area in the current pen color, starting at the current sprite position. (ie. it has no inputs).
The Scratch Fill block could also have no inputs,
or it could have X and Y Position inputs saying where the fill should start. eg. fill 100 100
…
Given that the Scratch Team wants their Scratch to be “low-floor” I think the simple
Fill ::penis the option that best fits with that and the one most beginners (I think) would see as something interesting and something fun to experiment with.
It could be a very good additional block to tinker with and add to existing scrips.
You mentioned Snap so I headed over there to see what I could do with this block. I made a simple Snap project with the Fill block — silly but fun.

The program is here if you want to see it in better quality: https://snap.berkeley.edu/project?user=10goto10&project=Fill%20Demo
Last edited by 10goto10 (Feb. 28, 2022 02:16:47)
- k0d3rrr
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Support, this would be very useful, but maybe the block should look like this (I've said this a billion times before):
fill with color [#bbdabc]:: pen // I'm spelling 'colour' as 'color' because that's how the block would naturally look.
- mumu245
-
1000+ posts
A Fill block in Scratch 3.0 (a pen block)
Does it fill like the fill bucket in the bitmap editor? Support.