Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_style_read_ienum ( SPIEnum val,
gchar const *  str,
SPStyleEnum const *  dict,
bool const   can_explicitly_inherit 
) [static]

Reads a style value and performs lookup based on the given style value enumerations.

Definition at line 2782 of file style.cpp.

References SPIEnum::computed, SPIEnum::inherit, SPIEnum::set, and SPIEnum::value.

Referenced by sp_style_merge_property(), and sp_style_read_penum().

{
    if ( can_explicitly_inherit && !strcmp(str, "inherit") ) {
        val->set = TRUE;
        val->inherit = TRUE;
    } else {
        for (unsigned i = 0; dict[i].key; i++) {
            if (!strcmp(str, dict[i].key)) {
                val->set = TRUE;
                val->inherit = FALSE;
                val->value = dict[i].value;
                /* Save copying for values not needing it */
                val->computed = val->value;
                break;
            }
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index