Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

int sp_filter_set_image_name ( SPFilter *  filter,
gchar const *  name 
)

Returns slot number for given image name, even if it's unknown.

Definition at line 501 of file sp-filter.cpp.

Referenced by sp_filter_primitive_name_previous_out().

                                                                  {
    int value = filter->_image_number_next;
    filter->_image_number_next++;
    gchar *name_copy = strdup(name);
    pair<gchar*,int> new_pair(name_copy, value);
    pair<map<gchar*,int,ltstr>::iterator,bool> ret = filter->_image_name->insert(new_pair);
    if (ret.second == false) {
        return (*ret.first).second;
    }
    return value;
}


Generated by  Doxygen 1.6.0   Back to index