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

static void sp_style_read_iscale24 ( SPIScale24 val,
gchar const *  str 
) [static]

Set SPIScale24 object from string.

Definition at line 2895 of file style.cpp.

References SPIScale24::inherit, SPIScale24::set, and SPIScale24::value.

Referenced by sp_style_merge_property(), and sp_style_read().

{
    if (!strcmp(str, "inherit")) {
        val->set = TRUE;
        val->inherit = TRUE;
    } else {
        gfloat value;
        if (sp_svg_number_read_f(str, &value)) {
            val->set = TRUE;
            val->inherit = FALSE;
            value = CLAMP(value, 0.0, 1.0);
            val->value = SP_SCALE24_FROM_FLOAT(value);
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index