# `GSComponent intersectionsWithLineFrom:to:`

*Instance Method*

Intersections between the transformed component representation and a line segment.

## Declaration

```swift
func intersectionsWithLine(from startPoint: NSPoint, to endPoint: NSPoint) -> FTPointArray
```

```objc
- (FTPointArray *) intersectionsWithLineFrom:(NSPoint) startPoint to:(NSPoint) endPoint;
```

```python
intersectionsWithLineFrom_to_(startPoint: NSPoint, endPoint: NSPoint) -> FTPointArray
```

## Discussion

Closed paths, open paths, and any placeholder representation are included. Returns an empty point array when there are no intersections.

## See Also

### Geometry

- [`GSComponent bounds`](/Core/GlyphsCore/GSComponent/bounds) — The bounds of the transformed component representation.
- [`GSComponent intersects:`](/Core/GlyphsCore/GSComponent/intersects:) — Whether the closed-path representation crosses that of another component.
- [`GSComponent intersectsDontCheckBounds:`](/Core/GlyphsCore/GSComponent/intersectsDontCheckBounds:) — Whether the closed-path representation crosses that of another component without first comparing their bounds.

