# PathSegment

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/PathSegment.java+class:androidx.core.graphics.PathSegment) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class PathSegment
```

<br />

*** ** * ** ***

A line segment that represents an approximate fraction of a `https://developer.android.com/reference/android/graphics/Path.html` after `https://developer.android.com/reference/androidx/core/graphics/PathUtils#flatten(android.graphics.Path)`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/graphics/PathSegment#PathSegment(android.graphics.PointF,float,android.graphics.PointF,float)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/PointF.html start, float startFraction, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/PointF.html end, float endFraction )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/core/graphics/PathSegment#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html o)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getEnd()()` The end point of the line segment. |
| `float` | `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getEndFraction()()` Fraction along the length of the path that the `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getEnd()` resides. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/PointF.html` | `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getStart()()` The start point of the line segment. |
| `float` | `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getStartFraction()()` Fraction along the length of the path that the `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getStart()` resides. |
| `int` | `https://developer.android.com/reference/androidx/core/graphics/PathSegment#hashCode()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/graphics/PathSegment#toString()()` |

## Public constructors

### PathSegment

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public PathSegment(
    @NonNull PointF start,
    float startFraction,
    @NonNull PointF end,
    float endFraction
)
```

## Public methods

### equals

```
public boolean equals(Object o)
```

### getEnd

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public @NonNull PointF getEnd()
```

The end point of the line segment.

### getEndFraction

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public float getEndFraction()
```

Fraction along the length of the path that the `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getEnd()` resides.

### getStart

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public @NonNull PointF getStart()
```

The start point of the line segment.

### getStartFraction

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

```
public float getStartFraction()
```

Fraction along the length of the path that the `https://developer.android.com/reference/androidx/core/graphics/PathSegment#getStart()` resides.

### hashCode

```
public int hashCode()
```

### toString

```
public String toString()
```