addPath method

void addPath (Path path, Offset offset, { Float64List matrix4 })

Adds a new subpath that consists of the given path offset by the given offset.

If matrix4 is specified, the path will be transformed by this matrix after the matrix is translated by the given offset. The matrix is a 4x4 matrix stored in column major order.

Implementation

void addPath(Path path, Offset offset, {Float64List matrix4}) {
  assert(path != null); // path is checked on the engine side
  assert(_offsetIsValid(offset));
  if (matrix4 != null) {
    assert(_matrix4IsValid(matrix4));
    _addPathWithMatrix(path, offset.dx, offset.dy, matrix4);
  } else {
    _addPath(path, offset.dx, offset.dy);
  }
}