logo

Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code

21 Pages1111 Words374 Views
   

Added on  2023-04-23

About This Document

This project aims to develop a program that opens windows and draws a picture on the screen using methods like circle moving, custom header, user input functions, hand execution, hello user, make scene, creating the procedure, and shape drawing using Splashkit MSYS2 terminal and Visual Studio Code.

Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code

   Added on 2023-04-23

ShareRelated Documents
Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code_1
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
Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code_2
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
Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code_3
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");
Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code_4
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
Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code_5
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
Creating a Program to Draw Shapes on Screen using Splashkit and Visual Studio Code_6

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
C++ Programming Tasks for Desklib Online Library
|20
|976
|199

Color Segmentation in MATLAB: A Step-by-Step Guide to Image Analysis and Object Labeling
|15
|4681
|205

Color Thresholding and Region Properties for Object Detection in Matlab
|14
|4681
|271

Mouse Maze Solver Program using C++ and Visual Studio
|2
|571
|280

HRSC Document System Requirements
|12
|2581
|488

Computing, Science & Engineering : Assignment
|4
|1500
|649