From d333cab2a60291c65fd840e5669799a9355a6666 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Sun, 28 Jun 2009 21:07:45 +0200 Subject: [PATCH] [CpmlCurve] Added stub for cpml_curve_length() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Placeholder for the Bézier length computation: patches welcome. --- cpml/cpml-curve.c | 22 ++++++++++++++++++++++ cpml/cpml-curve.h | 1 + 2 files changed, 23 insertions(+) diff --git a/cpml/cpml-curve.c b/cpml/cpml-curve.c index 6547a495..9ce0b7bb 100644 --- a/cpml/cpml-curve.c +++ b/cpml/cpml-curve.c @@ -45,6 +45,28 @@ cpml_curve_type_get_npoints(void) } /** + * cpml_curve_length: + * @curve: the #CpmlPrimitive curve data + * + * Given the @curve primitive, returns the approximated length of + * the Bézier curve. + * + * + * TODO + * + * To be implemented... + * + * + * + * Return value: the requested length + **/ +double +cpml_curve_length(const CpmlPrimitive *curve) +{ + return 0.; +} + +/** * cpml_curve_pair_at_time: * @curve: the #CpmlPrimitive curve data * @pair: the destination pair diff --git a/cpml/cpml-curve.h b/cpml/cpml-curve.h index 16103932..bdec4d6c 100644 --- a/cpml/cpml-curve.h +++ b/cpml/cpml-curve.h @@ -27,6 +27,7 @@ CAIRO_BEGIN_DECLS int cpml_curve_type_get_npoints (void) CPML_GNUC_CONST; +double cpml_curve_length (const CpmlPrimitive *curve); void cpml_curve_pair_at_time (const CpmlPrimitive *curve, CpmlPair *pair, double time); -- 2.11.4.GIT