---
title: "CTLineGetPenOffsetForFlush(_:_:_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctlinegetpenoffsetforflush(_:_:_:)"
---

# CTLineGetPenOffsetForFlush(_:_:_:)

Gets the pen offset required to draw flush text.

## Declaration

```swift
func CTLineGetPenOffsetForFlush(_ line: CTLine, _ flushFactor: CGFloat, _ flushWidth: Double) -> Double
```

## Parameters

- `line`: The line from which to obtain a flush position.
- `flushFactor`: Determines the type of flushness. A flushFactor of 0 or less indicates left flush. A flushFactor of 1.0 or more indicates right flush. Flush factors between 0 and 1.0 indicate varying degrees of center flush, with a value of 0.5 being totally center flush.
- `flushWidth`: Specifies the width to which the flushness operation should apply.

## Return Value

Return Value The offset from the current pen position for the flush operation.

## See Also

### Getting Line Data

- [CTLineGetGlyphCount(_:)](coretext/ctlinegetglyphcount(_:).md)
- [CTLineGetGlyphRuns(_:)](coretext/ctlinegetglyphruns(_:).md)
- [CTLineGetStringRange(_:)](coretext/ctlinegetstringrange(_:).md)
