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

SPStyle* sp_style_unref ( SPStyle style  ) 

Decrease refcount of style with possible destruction.

Definition at line 448 of file style.cpp.

References NRVpathDash::dash, SPStyle::fill, SPStyle::object, SPStyle::refcount, sp_style_paint_clear(), sp_text_style_unref(), SPStyle::stroke, SPStyle::stroke_dash, and SPStyle::text.

Referenced by 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) {
        // if (style->object)
        //    gtk_signal_disconnect_by_data(GTK_OBJECT(style->object), style);
        if (style->object)
                                                 G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, style);
        if (style->text) sp_text_style_unref(style->text);
        sp_style_paint_clear(style, &style->fill, TRUE, FALSE);
        sp_style_paint_clear(style, &style->stroke, TRUE, FALSE);

    return NULL;

Generated by  Doxygen 1.6.0   Back to index