Routine for drawing polygons in photo images