Logo Search packages:      
Sourcecode: inkscape version File versions

NR::Point sp_curve_second_point ( SPCurve const *const   curve  ) 

Return the second point of first subpath or curve->movePos if curve too short.

Definition at line 691 of file curve.cpp.

References SPCurve::_bpath, NArtBpath::c(), SPCurve::end, and SPCurve::movePos.

{
    g_return_val_if_fail(curve != NULL, NR::Point(0, 0));

    if (curve->end < 1) {
        return curve->movePos;
    }

    NArtBpath *bpath = NULL;
    if (curve->end < 2) {
        bpath = curve->_bpath;
    } else {
        bpath = curve->_bpath + 1;
    }
    g_return_val_if_fail(bpath != NULL, NR::Point(0, 0));
    return bpath->c(3);
}


Generated by  Doxygen 1.6.0   Back to index