testpat: rewrite the pixel drawing