Shape Drawing Program: Implementing Procedures and User Input
VerifiedAdded on 2023/04/23
|21
|1111
|374
Practical Assignment
AI Summary
This assignment focuses on developing a shape drawing program using Splashkit, MSYS2 terminal, and Visual Studio Code. The program involves opening a window and drawing shapes on the screen using methods such as circle movement, custom headers, user input functions, and hand execution. Key aspects covered include shape drawing procedures, creating scenes, implementing 'Hello User' functionality, and reading user inputs. The assignment also demonstrates how to load bitmaps and sound effects for animation. The conclusion highlights the successful implementation of the program, demonstrating the ability to create interactive graphical applications using Splashkit and Visual Studio Code.

Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Table of Contents
Introduction...........................................................................................................................................3
Shape drawing.......................................................................................................................................3
Creating procedure................................................................................................................................4
Hello user..............................................................................................................................................6
Hand execution......................................................................................................................................6
user input function.................................................................................................................................7
Custom Header......................................................................................................................................7
Output screenshots................................................................................................................................7
Conclusion...........................................................................................................................................19
References...........................................................................................................................................20
Introduction...........................................................................................................................................3
Shape drawing.......................................................................................................................................3
Creating procedure................................................................................................................................4
Hello user..............................................................................................................................................6
Hand execution......................................................................................................................................6
user input function.................................................................................................................................7
Custom Header......................................................................................................................................7
Output screenshots................................................................................................................................7
Conclusion...........................................................................................................................................19
References...........................................................................................................................................20

Introduction
The main aim of this project to develop the creating the program thats open windows
and draw a picture on the screen on the methods on the circle moving, custom header,
creating user input functions, hand execution, hello user, make scene, creating the procedure,
shape drawing using splashkit MSYS2 terminal, Visual Studio Code.
Shape drawing
The first creating the winndow open the new window on the visual studio platform.
We can used the calling function of the procedure funtion is Open_window. This procedure
can be used for the creating the title of the windows, and setting the width and height of the
windows procedure function. For the function can be used on will be opening on the windows
can be displayed on the visual studio console on 800 pixel width and 600 pixels hight of the
windows drawing pricture.
open_window("picture drawing",800,600);
step 1
visual studio opennew windows
Enter the code on the visual studio new windows file.
Creating the button and specified the action of Right click.
Compile and run the code. The console can be display on moving on the shape picture
in console.
Compiling the command line,
Step 2:
Creating the main function of drawing the circle and moving on the screen.Drawing the
shape can be implimenting on splashkit used for the creating the calling procedure. Drawing
the color shape in splaskit used the number of color. the calling procedure of the Splaskit
The main aim of this project to develop the creating the program thats open windows
and draw a picture on the screen on the methods on the circle moving, custom header,
creating user input functions, hand execution, hello user, make scene, creating the procedure,
shape drawing using splashkit MSYS2 terminal, Visual Studio Code.
Shape drawing
The first creating the winndow open the new window on the visual studio platform.
We can used the calling function of the procedure funtion is Open_window. This procedure
can be used for the creating the title of the windows, and setting the width and height of the
windows procedure function. For the function can be used on will be opening on the windows
can be displayed on the visual studio console on 800 pixel width and 600 pixels hight of the
windows drawing pricture.
open_window("picture drawing",800,600);
step 1
visual studio opennew windows
Enter the code on the visual studio new windows file.
Creating the button and specified the action of Right click.
Compile and run the code. The console can be display on moving on the shape picture
in console.
Compiling the command line,
Step 2:
Creating the main function of drawing the circle and moving on the screen.Drawing the
shape can be implimenting on splashkit used for the creating the calling procedure. Drawing
the color shape in splaskit used the number of color. the calling procedure of the Splaskit
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

color is COLOR_GREEN, COLOR_WHITE and many others. The visual studio code can be
displayed on the list of calling types. click the CTRL+SPACE button on the keyword the
circle shape can be move on the windows screen. The x values can be represent the position
of the Column values, and Y values can be represent the position of the row values.
Creating procedure
The creating the procedure can be used for the calling function of the program values
and display the shapes on the VS code console and using the command line on MSYS2.
Creating the Main() procedure function and using the calling parameters are
draw_shape_scene()
Each procedure can be perform on the sequence of the steps in the VS code and using
MSYS2 Terminal (To open windows in ivory towers, 2010).
Making the scene of procedure
The Making the scene of the VS code can be implementing on the imple animation by
creating a script that opens a window, and loads and draws bitmaps, and plays sound effects.
we can using the Loading procedure function on the program can be includes are,
load_bitmap("circle", "shape.png");
Draw _bitmap("circle", 20,30);
load_sound_effect('circle","shape.draw");
displayed on the list of calling types. click the CTRL+SPACE button on the keyword the
circle shape can be move on the windows screen. The x values can be represent the position
of the Column values, and Y values can be represent the position of the row values.
Creating procedure
The creating the procedure can be used for the calling function of the program values
and display the shapes on the VS code console and using the command line on MSYS2.
Creating the Main() procedure function and using the calling parameters are
draw_shape_scene()
Each procedure can be perform on the sequence of the steps in the VS code and using
MSYS2 Terminal (To open windows in ivory towers, 2010).
Making the scene of procedure
The Making the scene of the VS code can be implementing on the imple animation by
creating a script that opens a window, and loads and draws bitmaps, and plays sound effects.
we can using the Loading procedure function on the program can be includes are,
load_bitmap("circle", "shape.png");
Draw _bitmap("circle", 20,30);
load_sound_effect('circle","shape.draw");
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Hello user
The VS code of the this task can be change the variables and stores values of the
program. We can intialized the resources on the local variables can be declaration. declare a
local variable for use within that procedure. Using the MSYS2 Terminal command lines is,
Hand execution
Hand execution is the process of stepping through a block ofcode of the MSYS2
Terminal console.Variable declaration can be used for Allocates memory for the variable.
Drawing a box to represent the memory allocated to each variable. Declare the name of the
variable next variable now represents this piece of memory in the case.
Execution procedure
The VS code of the this task can be change the variables and stores values of the
program. We can intialized the resources on the local variables can be declaration. declare a
local variable for use within that procedure. Using the MSYS2 Terminal command lines is,
Hand execution
Hand execution is the process of stepping through a block ofcode of the MSYS2
Terminal console.Variable declaration can be used for Allocates memory for the variable.
Drawing a box to represent the memory allocated to each variable. Declare the name of the
variable next variable now represents this piece of memory in the case.
Execution procedure

Start at the beginning of main() function.
The first line declares 3 variables, so create three large-ish boxes on the page. Label
them a, b, and c. These spaces now represent the three different variables created in
the program.
The next line assigns the value 10 to a, so write 10 in the "a" box.
Similar actions occur on the next line.
When c is assigned, the expression reads the values of a and b . Look in the boxes on
your
page to find the values... then add them together and store the result in c . 6. The next
line then assigns a new value to a . Cross out the old value from the a box and write
in the new value (Posch and Galowicz, 2018).
Indicate what output by the write_line procedure call is procedure.
user input function
Create a new Circle_read_double () function that can read in a double from the user
list of Splash kit function.
Declare double variables to store these three new values in main (weight, height, and
bmi).
Make use of your new read_double function.
Custom Header
Open the MSYS2 of the Splash pack on Appearance > Customize > Header Image or
Appearance > Customize > General Theme Options > Header Image segment
include all the header records you need to use through the Appearance > Customize >
General Theme Options > Header picture > Add new shape> Save. And afterward
alter the page, post, and so forth where you need an alternate header and look down to
header and select one of the shapes you just transferred.
Output screenshots
Shape drawing in VS code
The first line declares 3 variables, so create three large-ish boxes on the page. Label
them a, b, and c. These spaces now represent the three different variables created in
the program.
The next line assigns the value 10 to a, so write 10 in the "a" box.
Similar actions occur on the next line.
When c is assigned, the expression reads the values of a and b . Look in the boxes on
your
page to find the values... then add them together and store the result in c . 6. The next
line then assigns a new value to a . Cross out the old value from the a box and write
in the new value (Posch and Galowicz, 2018).
Indicate what output by the write_line procedure call is procedure.
user input function
Create a new Circle_read_double () function that can read in a double from the user
list of Splash kit function.
Declare double variables to store these three new values in main (weight, height, and
bmi).
Make use of your new read_double function.
Custom Header
Open the MSYS2 of the Splash pack on Appearance > Customize > Header Image or
Appearance > Customize > General Theme Options > Header Image segment
include all the header records you need to use through the Appearance > Customize >
General Theme Options > Header picture > Add new shape> Save. And afterward
alter the page, post, and so forth where you need an alternate header and look down to
header and select one of the shapes you just transferred.
Output screenshots
Shape drawing in VS code
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser


⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser


Outputs
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 21
Related Documents
Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2026 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.




