[gtk/matthiasc/lottie2: 4/4] Fix offset calculation for curves




commit a6e041ccedc8ea4c2b6018a8d09309cdbb2333fc
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Nov 26 12:16:36 2020 -0500

    Fix offset calculation for curves
    
    We were returning a wrong offset that made the offset
    'dance around' the point we returned.

 gsk/gskpath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/gskpath.c b/gsk/gskpath.c
index da6898e710..76214d987a 100644
--- a/gsk/gskpath.c
+++ b/gsk/gskpath.c
@@ -1224,7 +1224,7 @@ gsk_standard_contour_get_closest_point (const GskContour       *contour,
               if (out_pos)
                 *out_pos = p;
               if (out_offset)
-                *out_offset = measure->start + (measure->end - measure->start) * found_progress;
+                *out_offset = measure->start + (measure->end - measure->start) * progress;
               if (out_tangent)
                 *out_tangent = t;
               result = TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]