Canvas of Picasso : Turbo C++

  After all the serious coding stuff, it’s time to get creative now. In this project, we won’t be working with any media player, web browser, automated animations, clock, stopwatch or any such thing which performs all the tasks automatically step-by-step as programmed. Here, we have something that would require you to interact with the program, utilise your creative skills and come up with something that’s entirely your own. As the title Canvas of Picasso suggests, we are going to present a program that involves drawing, painting etc.

This program is the last one of our Turbo C++ projects. Therefore, there won’t be any more of the BGI Graphics stuff. From now on, we shall work on only Visual C++ (Both Win32 & .NET) and Visual Basic (.NET) projects. However, we shall be glad to create any sort of Turbo C++ program if you explicitly ask us to. If you want any Turbo C++ project to be developed for you, you can ask us to create it. We’ll create and upload that project here.

 



Canvas of Picasso – Modules

This program is based on BGI Graphics, as you already know. Also, since this program is fully interactive and works according to user input at every single step, it is a lot more complex as compared to the Conical Waterfall, the Stylish Springs and even the Ultimate Animation Combo. Don’t worry though, for we’ve simplified everything as much as possible.

Here, almost all the tasks are performed by the function named Paint2Screen(), which is assisted by four simple functions which handle the input received from the mouse and manipulate the mouse pointer’s visibility and position. These four modules are – callmouse(), mouseposi(), mousehide() and setposi().

We shall now discuss the Paint2Screen module.

This function, when called by the main(), sets the default values of the following :

a) background colour of the drawing area

b) brush colour

c) brush thickness

d) brush position

Canvas of PicassoAfter this, it calls the functions callmouse() and setposi(). Now, the program gets ready for drawing. It draws along the path that is traversed by the mouse pointer while it is being dragged by the user. The changes in the position of the mouse pointer are handled by calling the function mouseposi(). Meanwhile, the user can change the brush type, brush colour, background colour etc. using the designated keys on the keyboard.

Canvas of Picassoa) The keys Q, W, E and R can be used to change the brush thickness. Q is the thinnest and R is the thickest.

b) The following keys are used to set colour of brush :

0 – Black, 1 – Blue, 2 – Green, 3 – Cyan, 4 – Red, 5 – Brown, 6 – Yellow, 7 – White, 8 – Magenta, 9 – Light Red

c) The following keys perform miscellanous tasks :

C – Clear, B – Change Background Colour, Esc – Exit

Canvas of PicassoThe above drawing illustrates how you can use the Canvas of Picasso to draw various types of shapes. We know that the drawing shown above is not so great πŸ˜€ (Anyway, who can match Pablo Picasso?) but we do hope that YOU can create excellent drawings using this program. Best of Luck !!!



Click here to download the Canvas of Picasso.

 

If you like this project, don’t forget to comment below… πŸ˜€

(Visited 471 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *