Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_object_read_attr ( SPObject object,
gchar const *  key 
)

Read value of key attribute from XML node into object.

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

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

Referenced by Inkscape::ColorProfile::build(), sp_feBlend_build(), sp_feBlend_update(), sp_feColorMatrix_build(), sp_feComposite_build(), sp_feConvolveMatrix_build(), sp_feDiffuseLighting_build(), sp_feDiffuseLighting_update(), sp_feDisplacementMap_build(), sp_fedistantlight_build(), sp_fedistantlight_update(), sp_feFlood_build(), sp_fefuncnode_build(), sp_feImage_build(), sp_feMergeNode_build(), sp_feMorphology_build(), sp_feOffset_build(), sp_feOffset_update(), sp_fepointlight_build(), sp_fepointlight_update(), sp_feSpecularLighting_build(), sp_feSpecularLighting_update(), sp_fespotlight_build(), sp_fespotlight_update(), sp_feTurbulence_build(), sp_filter_build(), sp_filter_primitive_build(), sp_filter_primitive_update(), sp_gaussianBlur_build(), sp_gaussianBlur_update(), 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(), sp_stop_build(), and sp_tref_build().

{
    g_assert(object != NULL);
    g_assert(SP_IS_OBJECT(object));
    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