private boolean isIndexInRangeSelection(int indexInDocument) {
    int textLength = textAnimation.getValue().text.length();
    if (textRangeStartAnimation != null && textRangeEndAnimation != null) {
      // After effects supports reversed text ranges where the start index is greater than the end index.
      // For the purposes of determining if the given index is inside of the range, we take the start as the smaller value.
      int rangeStart = Math.min(textRangeStartAnimation.getValue(), textRangeEndAnimation.getValue());
      int rangeEnd = Math.max(textRangeStartAnimation.getValue(), textRangeEndAnimation.getValue());

      if (textRangeOffsetAnimation != null) {
        int offset = textRangeOffsetAnimation.getValue();
        rangeStart += offset;
        rangeEnd += offset;
      }

      if (textRangeUnits == TextRangeUnits.INDEX) {
        return indexInDocument >= rangeStart && indexInDocument < rangeEnd;
      } else {
        float currentIndexAsPercent = indexInDocument / (float) textLength * 100;
        return currentIndexAsPercent >= rangeStart && currentIndexAsPercent < rangeEnd;
      }
    }
    return true;
  }
Configures the [fillPaint] and [strokePaint] used for drawing based on currently active text ranges.

@param parentAlpha A value from 0 to 255 indicating the alpha of the parented layer.
lottie/src/main/java/com/airbnb/lottie/model/layer/TextLayer.java