Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_style_merge_ifilter ( SPStyle style,
SPIFilter const *  parent 
) [static]

Merge filter style from parent. Filter effects do not inherit by default

Definition at line 2157 of file style.cpp.

References SPStyle::cloned, SPObject::connectModified(), SPObject::connectRelease(), SPIFilter::filter, SPStyle::filter, SPStyle::filter_hreffed, SPStyle::filter_modified_connection, SPStyle::filter_release_connection, SPIFilter::inherit, SPStyle::object, SPIFilter::set, sp_object_href(), sp_style_filter_clear(), sp_style_filter_modified(), sp_style_filter_release(), and SPIFilter::uri.

Referenced by sp_style_merge_from_dying_parent(), and sp_style_merge_from_parent().

{
    sp_style_filter_clear(style);
    style->filter.set = parent->set;
    style->filter.inherit = parent->inherit;
    style->filter.filter = parent->filter;
    style->filter.uri = parent->uri;
    if (style->filter.filter) {
        if (style->object && !style->cloned) { // href filter for style of non-clones only
            sp_object_href(SP_OBJECT(style->filter.filter), style);
            style->filter_hreffed = true;
        }
        if (style->object || style->cloned) { // connect to signals for style of real objects or clones (this excludes temp styles)
            SPObject *filter = style->filter.filter;
            style->filter_release_connection
                = filter->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_style_filter_release), style));
            style->filter_modified_connection
                = filter->connectModified(sigc::bind<2>(sigc::ptr_fun(&sp_style_filter_modified), style));
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index