Discuss Scratch

doglover005
Scratcher
28 posts

Saving drawings on player mode (Almost like MS Paint)

Hello there! I just wanted to ask that how do you save a pen drawing on Scratch?

deck26
Scratcher
1000+ posts

Saving drawings on player mode (Almost like MS Paint)

Work out what you need.

For a straight line you need the pen colour, start point and end point plus line thickness. For a curved line you need to store more points.

For a square/rectangle it should be enough to store orientation, length of sides, pen colour, limne thickness and one corner position.

And so on!

Then, what do you mean by ‘save’? If you mean keep it so you can restart the project and redraw the same image you'd need to either give the user something to cut and paste or save it to the cloud - which might then mean associating it with their username so you have to encode and decode text as well.

So your question needs pinning down a bit more and different options will require more or less work but none are trivial.
doglover005
Scratcher
28 posts

Saving drawings on player mode (Almost like MS Paint)

Actually I meant that how go you save a drawing on a list so that other people can view it?
deck26
Scratcher
1000+ posts

Saving drawings on player mode (Almost like MS Paint)

doglover005 wrote:

Actually I meant that how go you save a drawing on a list so that other people can view it?
Would have to save the data in one or more cloud variables. You'd need some way to distinguish between one drawing and the next.

You could also periodically go into the project and move cloud drawings into a list within the project.
footsocktoe
Scratcher
1000+ posts

Saving drawings on player mode (Almost like MS Paint)

doglover005 wrote:

Actually I meant that how go you save a drawing on a list so that other people can view it?

I have two projects that save pen drawings to a list…

A simple one… https://scratch.mit.edu/projects/92499286/

And a deluxe version… https://scratch.mit.edu/projects/101579277/

Powered by DjangoBB