Logo Search packages:      
Sourcecode: inkscape version File versions

SPStyle* sp_style_new_from_object ( SPObject object  ) 

Creates a new SPStyle object, and attaches it to the specified SPObject.

Definition at line 471 of file style.cpp.

References SPStyle::cloned, SPStyle::object, SPStyle::release_connection, sp_style_new(), and sp_style_object_release().

Referenced by sp_object_init().

{
    g_return_val_if_fail(object != NULL, NULL);
    g_return_val_if_fail(SP_IS_OBJECT(object), NULL);

    SPStyle *style = sp_style_new(SP_OBJECT_DOCUMENT(object));
    style->object = object;
    style->release_connection = object->connectRelease(sigc::bind<1>(sigc::ptr_fun(&sp_style_object_release), style));

    if (object && SP_OBJECT_IS_CLONED(object)) {
        style->cloned = true;
    }

    return style;
}


Generated by  Doxygen 1.6.0   Back to index