Discuss Scratch

appelmoeshapje732
Scratcher
12 posts

Pen extension

Please can you make a new block in the Pen extension called fill?
fill
1THEKINGBOB3
Scratcher
500+ posts

Pen extension

How would it know when to fill and what to fill? It could just fill up the whole screen…
or I'm just a crazy jester and I'm stupid.
Paddle2See
Scratch Team
1000+ posts

Pen extension

1THEKINGBOB3 wrote:

How would it know when to fill and what to fill? It could just fill up the whole screen…
or I'm just a crazy jester and I'm stupid.
I expect it would work like fill works in most bitmap editors - the “ink” spreads until it hits a line of pixels that are not the background color. And, yes, in some cases, that turns out to be the entire screen, if there isn't an enclosed space where the fill starts.
BigNate469
Scratcher
1000+ posts

Pen extension

Paddle2See wrote:

1THEKINGBOB3 wrote:

How would it know when to fill and what to fill? It could just fill up the whole screen…
or I'm just a crazy jester and I'm stupid.
I expect it would work like fill works in most bitmap editors - the “ink” spreads until it hits a line of pixels that are not the background color. And, yes, in some cases, that turns out to be the entire screen, if there isn't an enclosed space where the fill starts.
TL;DR like the existing fill tool in the bitmap editor.

Yeah, why not? Would be very useful for polygon-filling algorithms.
Rosics
Scratcher
500+ posts

Pen extension

setfillcolorto

Would the fill block fill the entire area scratch cat is in?
BigNate469
Scratcher
1000+ posts

Pen extension

Rosics wrote:

setfillcolorto

Would the fill block fill the entire area scratch cat is in?
Yes- see my post above. It would probably take the current coordinates of the sprite, and ignoring the costume of the sprite, work similarly to the existing fill feature in the bitmap editor.
makingstuffandya
Scratcher
17 posts

Pen extension

would you just make that “fill block” have an x and y position
BigNate469
Scratcher
1000+ posts

Pen extension

makingstuffandya wrote:

would you just make that “fill block” have an x and y position
Like the rest of the existing pen blocks (with the exception of “erase all”), it could just use the position of the sprite.
appelmoeshapje732
Scratcher
12 posts

Pen extension

BigNate469 wrote:

makingstuffandya wrote:

would you just make that “fill block” have an x and y position
Like the rest of the existing pen blocks (with the exception of “erase all”), it could just use the position of the sprite.
Mabye…
MagentaDude1359
Scratcher
100+ posts

Pen extension

Makes sense. It would be laggy, but it would be really useful for pen projects. Support.

Last edited by MagentaDude1359 (Jan. 4, 2025 15:00:08)

AHypnoman
Scratcher
1000+ posts

Pen extension

MagentaDude1359 wrote:

It would be laggy
Would it? Scratch's renderer should be able to do that instantly (or rather, within a frame).

Last edited by AHypnoman (Jan. 4, 2025 15:23:20)

makingstuffandya
Scratcher
17 posts

Pen extension

use the power of Triangle line 2 up and it would work so ya

Powered by DjangoBB