# PathOperation.Companion

Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/PathOperation.kt+class:androidx.compose.ui.graphics.PathOperation.Companion) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  object PathOperation.Companion
  ```

*** ** * ** ***

## Summary

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#Difference()` Subtract the second path from the first path. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#Intersect()` Create a new path that is the intersection of the two paths, leaving the overlapping pieces of the path. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#ReverseDifference()` Subtract the first path from the second path. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#Union()` Create a new path that is the union (inclusive-or) of the two paths. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#Xor()` Create a new path that is the exclusive-or of the two paths, leaving everything but the overlapping pieces of the path. | Cmn |

| ### Extension properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion#(androidx.compose.ui.graphics.PathOperation.Companion).difference()` **This property is deprecated.** Use PathOperation.Difference instead | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion#(androidx.compose.ui.graphics.PathOperation.Companion).intersect()` **This property is deprecated.** Use PathOperation.Intersect instead | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion#(androidx.compose.ui.graphics.PathOperation.Companion).reverseDifference()` **This property is deprecated.** Use PathOperation.ReverseDifference instead | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion#(androidx.compose.ui.graphics.PathOperation.Companion).union()` **This property is deprecated.** Use PathOperation.Union instead | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion.https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation.Companion#(androidx.compose.ui.graphics.PathOperation.Companion).xor()` **This property is deprecated.** Use PathOperation.Xor instead | Cmn |

## Public properties

### Difference

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
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.

See also:

- `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#ReverseDifference()`, which is the same but subtracting the first path from the second.

### Intersect

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
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.

See also:

- `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#Xor()`, which is the inverse of this operation

### ReverseDifference

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
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.

See also:

- `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#Difference()`, which is the same but subtracting the second path from the first.

### Union

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
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

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
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

See also:

- `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/PathOperation#Intersect()`, which is the inverse of this operation

## Extension properties

### PathOperation.Companion.difference

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/PathOperation.kt+symbol:difference) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val PathOperation.Companion.difference: PathOperation
```

> [!CAUTION]
> **This property is deprecated.**   
> Use PathOperation.Difference instead, use this instead:
>
> ```kotlin
> PathOperation.Difference
> ```

### PathOperation.Companion.intersect

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/PathOperation.kt+symbol:intersect) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val PathOperation.Companion.intersect: PathOperation
```

> [!CAUTION]
> **This property is deprecated.**   
> Use PathOperation.Intersect instead, use this instead:
>
> ```kotlin
> PathOperation.Intersect
> ```

### PathOperation.Companion.reverseDifference

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/PathOperation.kt+symbol:reverseDifference) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val PathOperation.Companion.reverseDifference: PathOperation
```

> [!CAUTION]
> **This property is deprecated.**   
> Use PathOperation.ReverseDifference instead, use this instead:
>
> ```kotlin
> PathOperation.ReverseDifference
> ```

### PathOperation.Companion.union

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/PathOperation.kt+symbol:union) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val PathOperation.Companion.union: PathOperation
```

> [!CAUTION]
> **This property is deprecated.**   
> Use PathOperation.Union instead, use this instead:
>
> ```kotlin
> PathOperation.Union
> ```

### PathOperation.Companion.xor

Cmn Artifact: [androidx.compose.ui:ui-graphics](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/graphics/PathOperation.kt+symbol:xor) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
val PathOperation.Companion.xor: PathOperation
```

> [!CAUTION]
> **This property is deprecated.**   
> Use PathOperation.Xor instead, use this instead:
>
> ```kotlin
> PathOperation.Xor
> ```