Paint method was redesigned.
Merge pull request #19 from ktsanov/master

Paint method was redesigned.