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

static void sp_style_read_ilengthornormal ( SPILengthOrNormal val,
gchar const *  str 
) [static]

Set SPILengthOrNormal object from string.

Definition at line 2916 of file style.cpp.

References SPILength::computed, SPILengthOrNormal::computed, SPILength::inherit, SPILengthOrNormal::inherit, SPILengthOrNormal::normal, SPILength::set, SPILengthOrNormal::set, sp_style_read_ilength(), SPILength::unit, SPILengthOrNormal::unit, SPILength::value, and SPILengthOrNormal::value.

Referenced by sp_style_merge_property(), and sp_style_read().

{
    if (!strcmp(str, "normal")) {
        val->set = TRUE;
        val->inherit = FALSE;
        val->normal = TRUE;
        val->unit = SP_CSS_UNIT_NONE;
        val->value = val->computed = 0.0;
    } else {
        SPILength length;
        sp_style_read_ilength(&length, str);
        val->set = length.set;
        val->inherit = length.inherit;
        val->normal = FALSE;
        val->unit = length.unit;
        val->value = length.value;
        val->computed = length.computed;
    }
}


Generated by  Doxygen 1.6.0   Back to index