From 5020931ffa03b676af60d00bafffc1dfe37708e9 Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Fri, 12 Jun 2009 19:43:32 +0200 Subject: [PATCH] [CpmlCurve] Added placeholder for curve-arc intersection API Actually the function does nothing but it is required to be defined by the CpmlPrimitive dispatching function. --- cpml/cpml-curve.c | 27 +++++++++++++++++++++++++++ cpml/cpml-curve.h | 3 +++ 2 files changed, 30 insertions(+) diff --git a/cpml/cpml-curve.c b/cpml/cpml-curve.c index c1c8df55..c411bfc8 100644 --- a/cpml/cpml-curve.c +++ b/cpml/cpml-curve.c @@ -235,6 +235,33 @@ cpml_curve_intersection_with_line(const CpmlPrimitive *curve, } /** + * cpml_curve_intersection_with_arc: + * @curve: a curve + * @arc: an arc + * @dest: a vector of at least 4 #CpmlPair + * + * Given a Bézier cubic @curve and an @arc, gets their intersection + * points and store the result in @dest. Because an arc and a cubic + * curve can have up to 4 intersections, @dest MUST be at least an + * array of 4 #CpmlPair. + * + * + * TODO + * + * To be implemented... + * + * + * + * Return value: the number of intersections (max 4) + **/ +int +cpml_curve_intersection_with_arc(const CpmlPrimitive *curve, + const CpmlPrimitive *arc, CpmlPair *dest) +{ + return 0; +} + +/** * cpml_curve_offset: * @curve: the #CpmlPrimitive curve data * @offset: distance for the computed parallel curve diff --git a/cpml/cpml-curve.h b/cpml/cpml-curve.h index 584a1120..c82bfc09 100644 --- a/cpml/cpml-curve.h +++ b/cpml/cpml-curve.h @@ -46,6 +46,9 @@ int cpml_curve_intersection_with_line (const CpmlPrimitive *curve, const CpmlPrimitive *line, CpmlPair *dest); +int cpml_curve_intersection_with_arc(const CpmlPrimitive *curve, + const CpmlPrimitive *arc, + CpmlPair *dest); void cpml_curve_offset (CpmlPrimitive *curve, double offset); -- 2.11.4.GIT