bug fixes:
onChange wasn't getting fired
backspace and delete were being clobbered all the time
set scale was being ignored when drawing the first segment of a line

changes:
added scaleFactor parameter
added width parameter to getImage()