While Loop in onDraw