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

static void sp_gradient_build ( SPObject object,
SPDocument document,
Inkscape::XML::Node repr 
) [static]

Virtual build: set gradient attributes from its associated repr.

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

References SPGradient::has_stops, and sp_object_read_attr().

Referenced by sp_gradient_class_init().

{
    SPGradient *gradient = SP_GRADIENT(object);

    if (((SPObjectClass *) gradient_parent_class)->build)
        (* ((SPObjectClass *) gradient_parent_class)->build)(object, document, repr);

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

    sp_object_read_attr(object, "gradientUnits");
    sp_object_read_attr(object, "gradientTransform");
    sp_object_read_attr(object, "spreadMethod");
    sp_object_read_attr(object, "xlink:href");

    /* Register ourselves */
    sp_document_add_resource(document, "gradient", object);
}


Generated by  Doxygen 1.6.0   Back to index