Added useful graphics routine.

Added a callback for the drawing routines. Still need to figure out how to pass in contextual data to the callback. Need to fix memory leak.