add some function to IPainter