Logo Search packages:      
Sourcecode: inkscape version File versions

SPStyle* sp_style_unref ( SPStyle style  ) 

Decrease refcount of style with possible destruction.

Definition at line 470 of file style.cpp.

References NRVpathDash::dash, SPStyle::fill, SPStyle::fill_modified_connection, SPStyle::fill_release_connection, SPStyle::filter_modified_connection, SPStyle::filter_release_connection, SPStyle::refcount, SPStyle::release_connection, sp_style_filter_clear(), sp_style_paint_clear(), sp_text_style_unref(), SPStyle::stroke, SPStyle::stroke_dash, SPStyle::stroke_modified_connection, SPStyle::stroke_release_connection, and SPStyle::text.

Referenced by SPObject::releaseReferences(), sp_desktop_get_font_size_tool(), and sp_style_read().

{
    g_return_val_if_fail(style != NULL, NULL);
    g_return_val_if_fail(style->refcount > 0, NULL);

    style->refcount -= 1;

    if (style->refcount < 1) {
        style->release_connection.disconnect();
        style->release_connection.~connection();
        if (style->text) sp_text_style_unref(style->text);
        sp_style_paint_clear(style, &style->fill);
        sp_style_paint_clear(style, &style->stroke);
        sp_style_filter_clear(style);
        style->fill_release_connection.disconnect();
        style->fill_release_connection.~connection();
        style->fill_modified_connection.disconnect();
        style->fill_modified_connection.~connection();
        style->stroke_release_connection.disconnect();
        style->stroke_release_connection.~connection();
        style->stroke_modified_connection.disconnect();
        style->stroke_modified_connection.~connection();
        style->filter_modified_connection.disconnect();
        style->filter_modified_connection.~connection();
        style->filter_release_connection.disconnect();
        style->filter_release_connection.~connection();
        g_free(style->stroke_dash.dash);
        g_free(style);
    }

    return NULL;
}


Generated by  Doxygen 1.6.0   Back to index