@Override public void setContents(List<Content> contentsBefore, List<Content> contentsAfter) {
    for (int i = 0; i < contentsBefore.size(); i++) {
      Content content = contentsBefore.get(i);
      if (content instanceof TrimPathContent &&
          ((TrimPathContent) content).getType() == ShapeTrimPath.Type.SIMULTANEOUSLY) {
        TrimPathContent trimPath = (TrimPathContent) content;
        trimPaths.addTrimPath(trimPath);
        trimPath.addListener(this);
      }
    }
  }
This was empirically derived by creating polystars, converting them to
curves, and calculating a scale factor.
It works best for polygons and stars with 3 points and needs more
work otherwise.
lottie/src/main/java/com/airbnb/lottie/animation/content/PolystarContent.java