an approximate blitting algorithm