A hacked up version of Apple's CIMicroPaint sample code, adding scrollbars and a HUD