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

SPGradientSpread sp_gradient_get_spread ( SPGradient gradient  ) 

Returns the effective spread of given gradient (climbing up the refs chain if needed).

Precondition:
SP_IS_GRADIENT(gradient).

Definition at line 846 of file sp-gradient.cpp.

References chase_hrefs(), has_spread_set(), and SPGradient::spread.

Referenced by gradient_ref_changed(), sp_lineargradient_painter_new(), and sp_radialgradient_painter_new().

{
    g_return_val_if_fail(SP_IS_GRADIENT(gradient), SP_GRADIENT_SPREAD_PAD);

    SPGradient const *src = chase_hrefs(gradient, has_spread_set);
    return ( src
             ? src->spread
             : SP_GRADIENT_SPREAD_PAD ); // pad is the default
}


Generated by  Doxygen 1.6.0   Back to index