Logo Search packages:      
Sourcecode: inkscape version File versions

Inkscape::XML::Node * ColorProfile::write ( SPObject object,
Inkscape::XML::Node repr,
guint  flags 
) [static, private]

Callback: write attributes to associated repr.

Definition at line 345 of file color-profile.cpp.

References href, intentStr, local, name, Inkscape::XML::Node::setAttribute(), and SPObjectClass::write.

Referenced by classInit().

{
    ColorProfile *cprof = COLORPROFILE(object);

    if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
        Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
        repr = xml_doc->createElement("svg:color-profile");
    }

    if ( (flags & SP_OBJECT_WRITE_ALL) || cprof->href ) {
        repr->setAttribute( "xlink:href", cprof->href );
    }

    if ( (flags & SP_OBJECT_WRITE_ALL) || cprof->local ) {
        repr->setAttribute( "local", cprof->local );
    }

    if ( (flags & SP_OBJECT_WRITE_ALL) || cprof->name ) {
        repr->setAttribute( "name", cprof->name );
    }

    if ( (flags & SP_OBJECT_WRITE_ALL) || cprof->intentStr ) {
        repr->setAttribute( "rendering-intent", cprof->intentStr );
    }

    if (cprof_parent_class->write) {
        (* cprof_parent_class->write)(object, repr, flags);
    }

    return repr;
}


Generated by  Doxygen 1.6.0   Back to index