Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_feBlend_update ( SPObject object,
SPCtx ctx,
guint  flags 
) [static]

Receives update notifications.

Definition at line 200 of file blend.cpp.

References SPObject::parent, sp_filter_name_for_image(), sp_filter_primitive_name_previous_out(), and sp_object_read_attr().

{
    SPFeBlend *blend = SP_FEBLEND(object);

    if (flags & SP_OBJECT_MODIFIED_FLAG) {
        sp_object_read_attr(object, "mode");
        sp_object_read_attr(object, "in2");
    }

    /* Unlike normal in, in2 is required attribute. Make sure, we can call
     * it by some name. */
    if (blend->in2 == Inkscape::Filters::NR_FILTER_SLOT_NOT_SET ||
        blend->in2 == Inkscape::Filters::NR_FILTER_UNNAMED_SLOT)
    {
        SPFilter *parent = SP_FILTER(object->parent);
        blend->in2 = sp_filter_primitive_name_previous_out(blend);
        object->repr->setAttribute("in2", sp_filter_name_for_image(parent, blend->in2));
    }

    if (((SPObjectClass *) feBlend_parent_class)->update) {
        ((SPObjectClass *) feBlend_parent_class)->update(object, ctx, flags);
    }
}


Generated by  Doxygen 1.6.0   Back to index