1.1-Introductie-Programmeren

Drawing in steps

Difficulty: Filled Filled Outlined

Using the pause() method, you can save separate steps while drawing. This method pauses the execution of the program until a key is pressed.

Draw a “one-line-house” as shown in the example saving each individual step. At the end of the program, save the drawing as a file using the saveImage() method. Note that your applications actually runs from a different folder than the one you are working in. So in order to save an image to this “Exercise5” directory, you’ll need to type saveImage("Exercise5/my-output.png").

Example

Example Example