added some debugging to poly2bitmap