closer scan-conversion code