about summary refs log tree commit diff
path: root/converter/other/pamtosvg/spline.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-09-08 03:21:47 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2023-09-08 03:21:47 +0000
commit67748e0e839d434cde6207cdc80b3e2a6f6e9097 (patch)
treec617a82ba7841b51d43c4cd303ae9119859a99ea /converter/other/pamtosvg/spline.c
parent24ef77c17672db9412323197f0f4f6f632534cfb (diff)
downloadnetpbm-mirror-67748e0e839d434cde6207cdc80b3e2a6f6e9097.tar.gz
netpbm-mirror-67748e0e839d434cde6207cdc80b3e2a6f6e9097.tar.xz
netpbm-mirror-67748e0e839d434cde6207cdc80b3e2a6f6e9097.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4638 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pamtosvg/spline.c')
-rw-r--r--converter/other/pamtosvg/spline.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/converter/other/pamtosvg/spline.c b/converter/other/pamtosvg/spline.c
index 61167ec4..9535ec6a 100644
--- a/converter/other/pamtosvg/spline.c
+++ b/converter/other/pamtosvg/spline.c
@@ -34,7 +34,7 @@ print_spline (FILE *f, spline_type s)
    of de Casteljau's algorithm.  See Schneider's thesis, p.37.
    The variable names are taken from there.  */
 
-float_coord
+Point
 evaluate_spline (spline_type s, float t)
 {
   spline_type V[4];    /* We need degree+1 splines, but assert degree <= 3.  */
@@ -52,9 +52,9 @@ evaluate_spline (spline_type s, float t)
   for (j = 1; j <= degree; j++)
     for (i = 0; i <= degree - j; i++)
       {
-        float_coord t1 = Pmult_scalar (V[j - 1].v[i], one_minus_t);
-        float_coord t2 = Pmult_scalar (V[j - 1].v[i + 1], t);
-        float_coord temp = Padd (t1, t2);
+        Point t1 = point_scaled(V[j - 1].v[i], one_minus_t);
+        Point t2 = point_scaled(V[j - 1].v[i + 1], t);
+        Point temp = point_sum(t1, t2);
         V[j].v[i].x = temp.x;
         V[j].v[i].y = temp.y;
         V[j].v[i].z = temp.z;
@@ -76,7 +76,7 @@ new_spline_list (void)
   return answer;
 }
 
-spline_list_type 
+spline_list_type
 empty_spline_list (void)
 {
   spline_list_type answer;
@@ -192,4 +192,3 @@ append_spline_list (spline_list_array_type *l, spline_list_type s)
                       SPLINE_LIST_ARRAY_LENGTH(*l));
   LAST_SPLINE_LIST_ARRAY_ELT (*l) = s;
 }
-