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

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

Virtual build: set offset attributes from corresponding repr.

Definition at line 215 of file sp-offset.cpp.

References Inkscape::XML::Node::attribute(), and sp_object_read_attr().

Referenced by sp_offset_class_init().

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

    if (object->repr->attribute("inkscape:radius")) {
        sp_object_read_attr (object, "inkscape:radius");
    } else {
        gchar const *oldA = object->repr->attribute("sodipodi:radius");
        object->repr->setAttribute("inkscape:radius",oldA);
        object->repr->setAttribute("sodipodi:radius",NULL);

        sp_object_read_attr (object, "inkscape:radius");
    }
    if (object->repr->attribute("inkscape:original")) {
        sp_object_read_attr (object, "inkscape:original");
    } else {
        gchar const *oldA = object->repr->attribute("sodipodi:original");
        object->repr->setAttribute("inkscape:original",oldA);
        object->repr->setAttribute("sodipodi:original",NULL);

        sp_object_read_attr (object, "inkscape:original");
    }
    if (object->repr->attribute("xlink:href")) {
        sp_object_read_attr(object, "xlink:href");
    } else {
        gchar const *oldA = object->repr->attribute("inkscape:href");
        if (oldA) {
            size_t lA = strlen(oldA);
            char *nA=(char*)malloc((1+lA+1)*sizeof(char));
            memcpy(nA+1,oldA,lA*sizeof(char));
            nA[0]='#';
            nA[lA+1]=0;
            object->repr->setAttribute("xlink:href",nA);
            free(nA);
            object->repr->setAttribute("inkscape:href",NULL);
        }
        sp_object_read_attr (object, "xlink:href");
    }
}

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