Painting

added onPaint functionality