Logo Search packages:      
Sourcecode: inkscape version File versions

gchar const* sp_filter_name_for_image ( SPFilter const *  filter,
int const   image 
)

Finds image name based on it's slot number. Returns 0 for unknown slot numbers.

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

Referenced by sp_feBlend_build(), sp_feBlend_update(), sp_feBlend_write(), sp_feComposite_build(), sp_feComposite_update(), sp_feComposite_write(), sp_feDisplacementMap_build(), sp_feDisplacementMap_update(), sp_feDisplacementMap_write(), and sp_filter_primitive_write().

                                                                               {
    switch (image) {
        case Inkscape::Filters::NR_FILTER_SOURCEGRAPHIC:
            return "SourceGraphic";
            break;
        case Inkscape::Filters::NR_FILTER_SOURCEALPHA:
            return "SourceAlpha";
            break;
        case Inkscape::Filters::NR_FILTER_BACKGROUNDIMAGE:
            return "BackgroundImage";
            break;
        case Inkscape::Filters::NR_FILTER_BACKGROUNDALPHA:
            return "BackgroundAlpha";
            break;
        case Inkscape::Filters::NR_FILTER_STROKEPAINT:
            return "StrokePaint";
            break;
        case Inkscape::Filters::NR_FILTER_FILLPAINT:
            return "FillPaint";
            break;
        case Inkscape::Filters::NR_FILTER_SLOT_NOT_SET:
        case Inkscape::Filters::NR_FILTER_UNNAMED_SLOT:
            return 0;
            break;
        default:
            for (map<gchar *, int, ltstr>::const_iterator i
                     = filter->_image_name->begin() ;
                 i != filter->_image_name->end() ; i++) {
                if (i->second == image) {
                    return i->first;
                }
            }
    }
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index