Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_curve_backspace ( SPCurve curve  ) 

Remove last segment of curve.

Definition at line 894 of file curve.cpp.

References SPCurve::_bpath, NArtBpath::c(), SPCurve::closed, NArtBpath::code, SPCurve::end, SPCurve::hascpt, SPCurve::movePos, NR_END, NR_MOVETO, NR_MOVETO_OPEN, and SPCurve::posSet.

{
    g_return_if_fail(curve != NULL);

    if (curve->end > 0) {
        curve->end -= 1;
        if (curve->end > 0) {
            NArtBpath *bp = curve->_bpath + curve->end - 1;
            if ((bp->code == NR_MOVETO)     ||
                (bp->code == NR_MOVETO_OPEN)  )
            {
                curve->hascpt = true;
                curve->posSet = true;
                curve->closed = false;
                curve->movePos = bp->c(3);
                curve->end -= 1;
            }
        }
        curve->_bpath[curve->end].code = NR_END;
    }
}


Generated by  Doxygen 1.6.0   Back to index