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

void SPGradientImpl::init ( SPGradient gr ) [static, private]

Callback for SPGradient object initialization.

Todo:
Fixme: reprs being rearranged (e.g. via the XML editor) may require us to clear the state.

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

References Inkscape::URIReference::changedSignal(), SPGradient::color, gradientRefChanged(), SPGradient::gradientTransform, SPGradient::has_stops, Geom::identity(), SPGradient::ref, SPGradient::spread, SPGradient::state, SPGradient::units, and SPGradient::vector.

Referenced by SPGradient::getType().

{
    gr->ref = new SPGradientReference(SP_OBJECT(gr));
    gr->ref->changedSignal().connect(sigc::bind(sigc::ptr_fun(SPGradientImpl::gradientRefChanged), gr));

    /** \todo
     * Fixme: reprs being rearranged (e.g. via the XML editor)
     * may require us to clear the state.
     */
    gr->state = SP_GRADIENT_STATE_UNKNOWN;

    gr->units = SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX;
    gr->units_set = FALSE;

    gr->gradientTransform = Geom::identity();
    gr->gradientTransform_set = FALSE;

    gr->spread = SP_GRADIENT_SPREAD_PAD;
    gr->spread_set = FALSE;

    gr->has_stops = FALSE;

    gr->vector.built = false;
    gr->vector.stops.clear();

    gr->color = NULL;

    new (&gr->modified_connection) sigc::connection();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index