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

void SPGradientImpl::removeChild ( SPObject object,
Inkscape::XML::Node child 
) [static, private]

Callback for remove_child event.

Definition at line 621 of file sp-gradient.cpp.

References Inkscape::XML::Node::attribute(), SPGradient::has_stops, SPGradient::invalidateVector(), and sp_object_setAttribute().

Referenced by classInit().

{
    SPGradient *gr = SP_GRADIENT(object);

    gr->invalidateVector();

    if (((SPObjectClass *) gradient_parent_class)->remove_child) {
        (* ((SPObjectClass *) gradient_parent_class)->remove_child)(object, child);
    }

    gr->has_stops = FALSE;
    SPObject *ochild;
    for ( ochild = sp_object_first_child(object) ; ochild ; ochild = SP_OBJECT_NEXT(ochild) ) {
        if (SP_IS_STOP(ochild)) {
            gr->has_stops = TRUE;
            break;
        }
    }

    if ( gr->getStopCount() == 0 ) {
        gchar const * attr = gr->repr->attribute("osb:paint");
        if ( attr && strcmp(attr, "solid") ) {
            sp_object_setAttribute( gr, "osb:paint", "solid", 0 );
        }
    }

    /* Fixme: should we schedule "modified" here? */
    object->requestModified(SP_OBJECT_MODIFIED_FLAG);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index