Based on example here: http://developer.android.com/training/custom-views/custom-drawing.html