Use newgraphics.
Removed Painter references.