Logo Search packages:      
Sourcecode: inkscape version File versions

static Point Geom::darray_right_tangent ( Point const   d[],
unsigned const   len 
) [static]

Estimates the (backward) tangent at d[last - 0.5].

Note:
The tangent is "backwards", i.e. it is with respect to decreasing index rather than increasing index.
Precondition:
2 <= len.

d[len - 1] != d[len - 2].

all[p in d] in_svg_plane(p).

Definition at line 731 of file bezier-utils.cpp.

References unit_vector().

Referenced by darray_right_tangent(), and generate_bezier().

{
    assert( 2 <= len );
    unsigned const last = len - 1;
    unsigned const prev = last - 1;
    assert( d[last] != d[prev] );
    return unit_vector( d[prev] - d[last] );
}


Generated by  Doxygen 1.6.0   Back to index