1 2 3 4 5 6 7 8 9 10 11 12
| void Image::_add_span (int old_id_span, int new_id_span) throw () {
std::map<int, Span *>::iterator old_it = this->_listSpan.find (old_id_span);
std::map<int, Span *>::const_iterator new_it = this->_listSpan.find (new_id_span);
PersoTypes::ListPoints old_pixels = old_it->second->content ();
for (PersoTypes::ListPoints::const_iterator it=old_pixels.begin ();it!=old_pixels.end ();it++) {
this->_pixel (*it).id_span (new_id_span);
new_it->second->content ().push_back (*it);
}
this->_listSpan.erase (old_it);
delete old_it->second;
} |
Partager