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

SPCurve* sp_curve_new_sized ( gint  length  ) 

Like sp_curve_new, but overriding the default initial capacity.

The returned curve's state is as if sp_curve_reset has just been called on it.

length Initial number of NArtBpath elements allocated for bpath (including NR_END element).

Definition at line 53 of file curve.cpp.

References SPCurve::_bpath, SPCurve::closed, NArtBpath::code, SPCurve::end, SPCurve::hascpt, SPCurve::length, SPCurve::moving, NR_END, SPCurve::posSet, SPCurve::refcount, and SPCurve::substart.

Referenced by sp_curve_concat(), sp_curve_new(), sp_curve_reverse(), and sp_curve_split().

    g_return_val_if_fail(length > 0, NULL);

    SPCurve *curve = g_new(SPCurve, 1);

    curve->refcount = 1;
    curve->_bpath = g_new(NArtBpath, length);
    curve->_bpath->code = NR_END;
    curve->end = 0;
    curve->length = length;
    curve->substart = 0;
    curve->hascpt = false;
    curve->posSet = false;
    curve->moving = false;
    curve->closed = false;

    return curve;

Generated by  Doxygen 1.6.0   Back to index