Logo Search packages:      
Sourcecode: inkscape version File versions

int sp_filter_primitive_name_previous_out ( SPFilterPrimitive *  prim  ) 

Gives name for output of previous filter. Makes things clearer when prim is a filter with two or more inputs. Returns the slot number of result of previous primitive, or NR_FILTER_SOURCEGRAPHIC if this is the first primitive.

Definition at line 252 of file sp-filter-primitive.cpp.

References SPObject::next, and sp_filter_set_image_name().

Referenced by sp_feBlend_build(), sp_feBlend_update(), sp_feComposite_build(), sp_feComposite_update(), sp_feDisplacementMap_build(), and sp_feDisplacementMap_update().

                                                                   {
    SPFilter *parent = SP_FILTER(prim->parent);
    SPObject *i = parent->children;
    while (i && i->next != prim) i = i->next;
    if (i) {
        SPFilterPrimitive *i_prim = SP_FILTER_PRIMITIVE(i);
        if (i_prim->image_out < 0) {
            Glib::ustring name = sp_filter_get_new_result_name(parent);
            int slot = sp_filter_set_image_name(parent, name.c_str());
            i_prim->image_out = slot;
            i_prim->repr->setAttribute("result", name.c_str());
            return slot;
        } else {
            return i_prim->image_out;
        }
    }
    return Inkscape::Filters::NR_FILTER_SOURCEGRAPHIC;
}


Generated by  Doxygen 1.6.0   Back to index