How to Create a Simple Paint Program in Music Blocks
Editor’s Note: This is a guest post created by Henry via the Contribute a Post feature on this website. It has been minimally edited by Devin Ulibarri.
I’m going to show you how to make a paint program. First throw out everything in the Start block. We will be using the following blocks:
- Pen up: So your Mouse doesn’t draw a line beneath it
- Forever: Makes a loop so anything in it goes forever
- Set x and y to cursor x and cursor y: Moves your mouse avatar to wherever your mouse pointer is
- If Then Else: If whatever you put in the If part happens, then do whatever you put in the Then part, If not then it will do whatever you put in the Else part
- Mouse button: (in the If place) If your mouse button is hit, it will do whatever is in the Then place
- Pen down: (in the Then place) If mouse button is pressed, the pen will go down and start drawing
- Pen up: (in the Else place) If the mouse button is not hit, the pen will stay up (not draw)
For more details, follow my step-by-step instructions in this video:
https://youtu.be/3ty4Ybnn7w8 or https://redirect.invidious.io/watch?v=3ty4Ybnn7w8
Project Link: https://musicblocks.sugarlabs.org/index.html?id=1630373125482735&run=True
This is great. Would love to hear your ideas about how to incorporate some music into your paint program.