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

Geom::Matrix sp_gradient_get_g2d_matrix ( SPGradient const *  gr,
Geom::Matrix const &  ctm,
Geom::Rect const &  bbox 
)

Transforms to/from gradient position space in given environment

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

References Geom::D2< Interval >::dimensions().

{
    if (gr->getUnits() == SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX) {
        return ( Geom::Scale(bbox.dimensions())
                 * Geom::Translate(bbox.min())
                 * Geom::Matrix(ctm) );
    } else {
        return ctm;
    }
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index