Final source code for myPaint