ICS 3M     The Paint Program

Due:

Marks: 50

 


Design a simple paint program. Your program will allow the user to use the mouse to draw a simple picture, and allow the user to save this as a jpg file. At the basic level your program must allow the user to use the mouse to place small Jpegs on the picture (like the kid pix stamp). The screen should look something like:

 


Draw-IT

 

 

 

 

 

 

 

 

 

 


Where the small boxes are used to select the bitmap to use. The large box is the drawing canvas. It should start out white. When the user clicks on the canvas the program will place the selected bitmap on the canvas.

Saving from the screen

The procedure you will use to save a portion of the screen is in the Pic object. It is:

            Pic.ScreenSave(x1,y1,x2,y2,filename)

                        Where (x1,y1) (x2,y2) is the area on the screen you want to save to the file filename.

When to activate the save and load it is up to you. The simplest way would be to load from a set file at the beginning of the program, and save back to it at the end of the program. Better solutions (more marks) involve allowing the user to click on a button and then enter the name for the file they want to save or load.

 

Other Features

This program is unlike the previous programs that you have done.  This is a real program. You will be expected to do a lot of work.  You will also be expected to hand in an individual program.  It is extremely important that you understand your entire program.  I will quiz you on it if I am not convinced that it is all yours.  The description given above is a basis for your program.  To get perfect you will have to advance this with extra features.  The extras you add are up to you.  Some suggestions are:

1.         When one of the small pictures is clicked on indicate it is selected by drawing a green box around it.

2.         Add the ability to draw other shapes like star, box, line.

3.         Allow users to change the colours of what they draw.

4.         Allow for erasing.

 

Planning and comments

Because this is a large program it is important that you plan what you are doing on paper, use good variable names and add comments to clarify your code. Don’t wait ‘till the end to do this you will lose out on the advantage of the clarity it gives you.