private boolean offsetCanvas(Canvas canvas, DocumentData documentData, int lineIndex, float lineWidth) {
    PointF position = documentData.boxPosition;
    PointF size = documentData.boxSize;
    float dpScale = Utils.dpScale();
    float lineStartY = position == null ? 0f : documentData.lineHeight * dpScale + position.y;
    float lineOffset = (lineIndex * documentData.lineHeight * dpScale) + lineStartY;
    if (lottieDrawable.getClipTextToBoundingBox() && size != null && position != null && lineOffset >= position.y + size.y + documentData.size) {
      return false;
    }
    float lineStart = position == null ? 0f : position.x;
    float boxWidth = size == null ? 0f : size.x;
    switch (documentData.justification) {
      case LEFT_ALIGN:
        canvas.translate(lineStart, lineOffset);
        break;
      case RIGHT_ALIGN:
        canvas.translate(lineStart + boxWidth - lineWidth, lineOffset);
        break;
      case CENTER:
        canvas.translate(lineStart + boxWidth / 2f - lineWidth / 2f, lineOffset);
        break;
    }
    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