new flood-fill and improved painting