The SketchPad application was developed alongside the 3D Software Rasteriser during the module Graphics 1. This application has the capability of letting the user draw straight to a canvas in various different ways, similarly to Microsoft’s Paint program. The whole idea behind the project was to learn the theory behind 2D graphics and learn about well known algorithms and be able to implement them. This gave us a stepping stone to 3D. When developing this application, we were limited to using C++ and Win32 GDI only.


  • Completely software based and running on either my own code or well-known theories/algorithms.
  • The only GDI functions I use are SetPixel(), BitBlt() and StretchBlt().
  • Basic bitmap loading and saving.
  • Undo and redo tools.
  • Freehand, eraser and line drawing
  • Can draw following shapes: rectangles, stars, ellipses, triangles and right-angled triangles.
  • Polyline drawing with basic scanline filling.
  • Can change the line width to any size up-to 9999.
  • A fill tool (using a self implemented flood-fill queue).
  • Can change the main colour and secondary colour using Windows colour dialog.
  • The secondary colour can change the background colour of the SketchPad.
  • The “New” button clears the SketchPad.
  • Keyboard hot-keys implemented.
  • The drawing is saved directly to a memory bitmap – this is so it doesn’t redraw everything after each refresh.


This slideshow requires JavaScript.




Executable and Source (1MB)