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

static void sp_style_read_icolor ( SPIPaint paint,
gchar const *  str,
SPStyle style,
SPDocument document 
) [static]

Set SPIPaint object from string containing an integer value.

Parameters:
document Ignored

Definition at line 3105 of file style.cpp.

References SPIPaint::currentcolor, SPIPaint::inherit, SPIPaint::set, and SPIPaint::setColor().

Referenced by sp_style_merge_property(), and sp_style_read().

{
    (void)style; // TODO
    (void)document; // TODO
    paint->currentcolor = FALSE;  /* currentColor not a valid <color>. */
    if (!strcmp(str, "inherit")) {
        paint->set = TRUE;
        paint->inherit = TRUE;
    } else {
        guint32 const rgb0 = sp_svg_read_color(str, 0xff);
        if (rgb0 != 0xff) {
            paint->setColor(rgb0);
            paint->set = TRUE;
            paint->inherit = FALSE;
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index