combine method

Path combine (PathOperation operation, Path path1, Path path2)

Combines the two paths according to the manner specified by the given operation.

The resulting path will be constructed from non-overlapping contours. The curve order is reduced where possible so that cubics may be turned into quadratics, and quadratics maybe turned into lines.

Implementation

static Path combine(PathOperation operation, Path path1, Path path2) {
  assert(path1 != null);
  assert(path2 != null);
  final Path path = new Path();
  if (path._op(path1, path2, operation.index)) {
    return path;
  }
  throw new StateError('Path.combine() failed.  This may be due an invalid path; in particular, check for NaN values.');
}