# PathSegment

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/graphics/PathSegment "View this page in Java")

<br />

```
class PathSegment
```

<br />

*** ** * ** ***

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

## Summary

|                                                                                                                                                                                                                                                                           ### Public constructors                                                                                                                                                                                                                                                                           |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PathSegment](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#PathSegment(android.graphics.PointF,float,android.graphics.PointF,float))`(` ` start: `[PointF](https://developer.android.com/reference/android/graphics/PointF.html)`,` ` startFraction: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`,` ` end: `[PointF](https://developer.android.com/reference/android/graphics/PointF.html)`,` ` endFraction: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) `)` |

|                                 ### Public functions                                 |
|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)  | [equals](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#equals(java.lang.Object))`(o: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!)`                                                                                      |
| [PointF](https://developer.android.com/reference/android/graphics/PointF.html)       | [getEnd](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#getEnd())`()` The end point of the line segment.                                                                                                                                                    |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)      | [getEndFraction](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#getEndFraction())`()` Fraction along the length of the path that the[end point](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#getEnd())resides.         |
| [PointF](https://developer.android.com/reference/android/graphics/PointF.html)       | [getStart](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#getStart())`()` The start point of the line segment.                                                                                                                                              |
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)      | [getStartFraction](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#getStartFraction())`()` Fraction along the length of the path that the[start point](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#getStart())resides. |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [hashCode](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#hashCode())`()`                                                                                                                                                                                   |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [toString](https://developer.android.com/reference/kotlin/androidx/core/graphics/PathSegment#toString())`()`                                                                                                                                                                                   |

## Public constructors

### PathSegment

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

```
PathSegment(
    start: PointF,
    startFraction: Float,
    end: PointF,
    endFraction: Float
)
```  

## Public functions

### equals

```
fun equals(o: Any!): Boolean
```  

### getEnd

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

```
fun getEnd(): PointF
```

The end point of the line segment.  

### getEndFraction

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

```
fun getEndFraction(): Float
```

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

### getStart

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

```
fun getStart(): PointF
```

The start point of the line segment.  

### getStartFraction

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

```
fun getStartFraction(): Float
```

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

### hashCode

```
fun hashCode(): Int
```  

### toString

```
fun toString(): String!
```