GDI+ Visualizer: improve drawing code