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

template<typename LengthT>
static void sp_style_merge_length_prop_from_dying_parent ( LengthT &  child,
LengthT const &  parent,
double const   parent_child_em_ratio 
) [inline, static]

Todo:
fixme: Have separate ex ratio parameter. Get x height from libnrtype or pango.

Definition at line 1692 of file style.cpp.

{
    if ( ( !(child.set) || child.inherit )
         && parent.set && !(parent.inherit) )
    {
        child = parent;
        switch (parent.unit) {
            case SP_CSS_UNIT_EM:
            case SP_CSS_UNIT_EX:
                child.value *= parent_child_em_ratio;
                /** \todo
                 * fixme: Have separate ex ratio parameter.
                 * Get x height from libnrtype or pango.
                 */
                if (!IS_FINITE(child.value)) {
                    child.value = child.computed;
                    child.unit = SP_CSS_UNIT_NONE;
                }
                break;

            default:
                break;
        }
    }
}


Generated by  Doxygen 1.6.0   Back to index