Special case the full path
diff --git a/lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java b/lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java
index 44c32b6..e4b96cf 100644
--- a/lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java
+++ b/lottie/src/main/java/com/airbnb/lottie/animation/content/BaseStrokeContent.java
@@ -223,10 +223,11 @@
float animEndValue = pathGroup.trimPath.getEnd().getValue() / 100f;
float animOffsetValue = pathGroup.trimPath.getOffset().getValue() / 360f;
- // if (animStartValue == 0f && animEndValue == 1f) {
- // canvas.drawPath(path, paint);
- // return;
- // }
+ // If the start-end is ~100, consider it to be the full path.
+ if (animStartValue < 0.01f && animEndValue > 0.99f) {
+ canvas.drawPath(path, paint);
+ return;
+ }
pm.setPath(path, false);
float totalLength = pm.getLength();
diff --git a/lottie/src/main/java/com/airbnb/lottie/utils/Utils.java b/lottie/src/main/java/com/airbnb/lottie/utils/Utils.java
index 78fc0f2..dc07d4b 100644
--- a/lottie/src/main/java/com/airbnb/lottie/utils/Utils.java
+++ b/lottie/src/main/java/com/airbnb/lottie/utils/Utils.java
@@ -154,8 +154,8 @@
}
float start = length * startValue;
float end = length * endValue;
- float newStart = start; //Math.min(start, end);
- float newEnd = end; //Math.max(start, end);
+ float newStart = Math.min(start, end);
+ float newEnd = Math.max(start, end);
float offset = offsetValue * length;
newStart += offset;