[gtk/wip/matthiasc/lottie-stroke] spline: Fix interpretation of MIN_PROGRESS



commit 7c8c3556128e49dc807b40d339ff8c10e8eb07d6
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 1 12:53:51 2020 -0500

    spline: Fix interpretation of MIN_PROGRESS
    
    The conic and cubic decompose functions disagree
    about the value being > 1 vs < 1. Currently, cubics
    are losing and always get decomposed into straight
    lines.

 gsk/gskspline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gsk/gskspline.c b/gsk/gskspline.c
index 6eafc4b09a..df27d6007f 100644
--- a/gsk/gskspline.c
+++ b/gsk/gskspline.c
@@ -223,7 +223,7 @@ gsk_spline_cubic_decompose (GskCubicDecomposition  *d,
 {
   graphene_point_t left[4], right[4];
 
-  if (!gsk_spline_cubic_too_curvy (pts, d->tolerance) || progress < 1 / MIN_PROGRESS)
+  if (!gsk_spline_cubic_too_curvy (pts, d->tolerance) || progress < MIN_PROGRESS)
     {
       gsk_spline_decompose_add_point (&d->decomp, &pts[3], progress);
       return;


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