Logo Search packages:      
Sourcecode: inkscape version File versions

guint32 sp_desktop_get_color ( SPDesktop desktop,
bool  is_fill 
)

Return the desktop's current color.

Definition at line 228 of file desktop-style.cpp.

References SPDesktop::current.

{
    guint32 r = 0; // if there's no color, return black
    gchar const *property = sp_repr_css_property(desktop->current,
                                                 is_fill ? "fill" : "stroke",
                                                 "#000");

    if (desktop->current && property) { // if there is style and the property in it,
        if (strncmp(property, "url", 3)) { // and if it's not url,
            // read it
            r = sp_svg_read_color(property, r);
        }
    }

    return r;
}


Generated by  Doxygen 1.6.0   Back to index