# `GSLayer calculateIntersectionsForPath:startPoint:endPoint:`

*Instance Method*

> **Deprecated**

Points where a line segment intersects a path.

## Declaration

```swift
func calculateIntersections(for path: GSPath, start startPoint: NSPoint, end endPoint: NSPoint) -> FTPointArray
```

```objc
- (FTPointArray *) calculateIntersectionsForPath:(GSPath *) path startPoint:(NSPoint) startPoint endPoint:(NSPoint) endPoint;
```

```python
calculateIntersectionsForPath_startPoint_endPoint_(path: GSPath, startPoint: NSPoint, endPoint: NSPoint) -> FTPointArray
```

## Parameters

- `path` — The path to inspect.
- `startPoint` — The start of the line segment in layer coordinates.
- `endPoint` — The end of the line segment in layer coordinates.

## Discussion

The returned point array does not include the line endpoints unless they intersect the path. Use [`GSPath intersectionsWithLineFrom:to:`](/Core/GlyphsCore/GSPath/intersectionsWithLineFrom:to:) instead.

