code: public void calculatePath(
              ShapeAppearanceModel shapeAppearanceModel,
              float interpolation,
              RectF bounds,
              PathListener pathListener,
              Path path) {
          path.rewind();
          ShapeAppearancePathSpec spec =
                  new ShapeAppearancePathSpec(
                          shapeAppearanceModel, interpolation, bounds, pathListener, path);
  
          // Calculate the transformations (rotations and translations) necessary for each edge and
          // corner treatment.
          for (int index = 0; index < 4; index++) {
              setCornerPathAndTransform(spec, index);
              setEdgePathAndTransform(index);
          }
  
          // Apply corners and edges to the path in clockwise interleaving sequence: top-right corner,
          // right edge, bottom-right corner, bottom edge, bottom-left corner etc. We start from the top
          // right corner rather than the top left to work around a bug in API level 21 and 22 in which
          // rounding error causes the path to incorrectly be marked as concave.
          for (int index = 0; index < 4; index++) {
              appendCornerPath(spec, index);
              appendEdgePath(spec, index);
          }
  
          path.close();
      }
docs: Writes the given {@link ShapeAppearanceModel} to {@code path}
  
  @param shapeAppearanceModel The shape to be applied in the path.
  @param interpolation        the desired interpolation.
  @param bounds               the desired bounds for the path.
  @param pathListener         the path
  @param path                 the returned path out-var.