Google is committed to advancing racial equity for Black communities. See how.

# PathOperation

`enum class PathOperation`
 kotlin.Any ↳ kotlin.Enum ↳ androidx.ui.graphics.PathOperation

Strategies for combining paths.

• Path.combine, which uses this enum to decide how to combine two paths.

## Summary

Enum values
`difference`

Subtract the second path from the first path.

`intersect`

Create a new path that is the intersection of the two paths, leaving the overlapping pieces of the path.

`reverseDifference`

Subtract the first path from the second path.

`union`

Create a new path that is the union (inclusive-or) of the two paths.

`xor`

Create a new path that is the exclusive-or of the two paths, leaving everything but the overlapping pieces of the path.

## Enum values

### difference

`enum val difference : PathOperation`

Subtract the second path from the first path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be a crescent portion of the first circle that was not overlapped by the second circle.

• reverseDifference, which is the same but subtracting the first path from the second.

### intersect

`enum val intersect : PathOperation`

Create a new path that is the intersection of the two paths, leaving the overlapping pieces of the path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be only the overlapping portion of the two circles.

• xor, which is the inverse of this operation

### reverseDifference

`enum val reverseDifference : PathOperation`

Subtract the first path from the second path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be a crescent portion of the second circle that was not overlapped by the first circle.

• difference, which is the same but subtracting the second path from the first.

### union

`enum val union : PathOperation`

Create a new path that is the union (inclusive-or) of the two paths.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the result would be a figure-eight like shape matching the outer boundaries of both circles.

### xor

`enum val xor : PathOperation`

Create a new path that is the exclusive-or of the two paths, leaving everything but the overlapping pieces of the path.

For example, if the two paths are overlapping circles of equal diameter but differing centers, the figure-eight like shape less the overlapping parts