2D SketchpadGraphics 1 Module - We were also tasked with developing a 2D Sketchpad that we could draw shapes of various sizes onto. My basic implementation allows the user to draw unfilled circles and rectangles and also filled rectangles and circles.
Using the GDI FillRect & FillEllipse function I allowed the application to fill shapes and a colour picker allows the user to choose the colour they want to fill the shape with, the image to the right shows we have chosen blue. The user can also use the pen tool to free draw in a colour of their choosing and can also use the line tool to draw lines in a colour. There is an eraser tool that allows us to remove colour from the canvas and set the pixels to white. Finally we can clear the canvas using one single click and start from a blank canvas. BELOW IS A DEMO EXE, You may require Visual Studio 2012 Run Time Components to run correctly. |
|