added missing support for painting, close #1517