~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/display/bezier-utils.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __SP_BEZIER_UTILS_H__
 
2
#define __SP_BEZIER_UTILS_H__
 
3
 
 
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
 */
 
18
 
 
19
#include <libnr/nr-forward.h>
 
20
#include <glib/gtypes.h>
 
21
 
 
22
/* Bezier approximation utils */
 
23
 
 
24
gint sp_bezier_fit_cubic(NR::Point bezier[], NR::Point const data[], gint len, gdouble error);
 
25
 
 
26
gint sp_bezier_fit_cubic_r(NR::Point bezier[], NR::Point const data[], gint len, gdouble error,
 
27
                           unsigned max_beziers);
 
28
 
 
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);
 
32
 
 
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);
 
36
 
 
37
 
 
38
#endif /* __SP_BEZIER_UTILS_H__ */
 
39
 
 
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 :