There are many ways to draw rectangles with Scratch . You can use a "dot+length+width" to draw, you can also use "two diagonal vertices of the rectangle to draw", you can also use "length+flip 90°+width+flip" 90° to draw".
1. "Point + Length + Width" method
1.1 Define the "straight line" building block
- Click "Add Extension" on the left side of Scratch - "Paint
- Click "Homemade Building Blocks" in Scratch --"Make a new building block--"Straight Line--" to add 4 parameters, as shown in Figures (1) and (2):
1.2 Define "Rectangular 1" building block
- Click "Homemade Building Blocks" in Scratch - "Make a new building block --" Rectangle 1 - "Add 4 parameters, as shown in Figures (3) and (4):
2. "Diagonal apex" method
2.1 Define the "rectangular (diagonal)" building block
3. "Length and width flip 90°" method
3.1 Define the "rectangular (flip)" building block
4. Define "restore" building blocks
5. Main function
The effect is as follows: