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

void sp_object_read_attr ( SPObject object,
gchar const *  key 

Read value of key attribute from XML node into object.

Definition at line 1023 of file sp-object.cpp.

References SPObject::repr, SP_ATTR_INVALID, sp_attribute_lookup(), and sp_object_set().

Referenced by Inkscape::colorprofile_build(), sp_gradient_build(), sp_lineargradient_build(), sp_nodepath_new(), sp_object_build(), sp_object_repr_attr_changed(), sp_offset_build(), sp_radialgradient_build(), sp_root_build(), sp_spiral_build(), and sp_stop_build().

    g_assert(object != NULL);
    g_assert(key != NULL);

    g_assert(object->repr != NULL);

    unsigned int keyid = sp_attribute_lookup(key);
    if (keyid != SP_ATTR_INVALID) {
        /* Retrieve the 'key' attribute from the object's XML representation */
        gchar const *value = object->repr->attribute(key);

        sp_object_set(object, keyid, value);

Generated by  Doxygen 1.6.0   Back to index