1 #ifndef __SP_BEZIER_UTILS_H__
2 #define __SP_BEZIER_UTILS_H__
4 /*
5 * An Algorithm for Automatically Fitting Digitized Curves
6 * by Philip J. Schneider
7 * from "Graphics Gems", Academic Press, 1990
8 *
9 * Authors:
10 * Philip J. Schneider
11 * Lauris Kaplinski <lauris@ximian.com>
12 *
13 * Copyright (C) 1990 Philip J. Schneider
14 * Copyright (C) 2001 Lauris Kaplinski and Ximian, Inc.
15 *
16 * Released under GNU GPL
17 */
19 #include <libnr/nr-forward.h>
20 #include <glib/gtypes.h>
22 /* Bezier approximation utils */
24 gint sp_bezier_fit_cubic(NR::Point bezier[], NR::Point const data[], gint len, gdouble error);
26 gint sp_bezier_fit_cubic_r(NR::Point bezier[], NR::Point const data[], gint len, gdouble error,
27 unsigned max_beziers);
29 gint sp_bezier_fit_cubic_full(NR::Point bezier[], int split_points[], NR::Point const data[], gint len,
30 NR::Point const &tHat1, NR::Point const &tHat2,
31 gdouble error, unsigned max_beziers);
33 NR::Point sp_darray_left_tangent(NR::Point const d[], unsigned const len);
34 NR::Point sp_darray_left_tangent(NR::Point const d[], unsigned const len, double const tolerance_sq);
35 NR::Point sp_darray_right_tangent(NR::Point const d[], unsigned const length, double const tolerance_sq);
38 #endif /* __SP_BEZIER_UTILS_H__ */
40 /*
41 Local Variables:
42 mode:c++
43 c-file-style:"stroustrup"
44 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
45 indent-tabs-mode:nil
46 fill-column:99
47 End:
48 */
49 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :