<!--
{
  "availability" : [
    "macOS: 10.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLineSweepDirection",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSLineSweepDirection"
  },
  "title" : "NSLineSweepDirection"
}
-->

# NSLineSweepDirection

Values that describe the progression of text on a page.

```
enum NSLineSweepDirection : NSUInteger;
```

## Overview

The typesetter decides which way text should flow and passes these values as arguments to the text container, which uses them to calculate the next line rectangle.

Line sweep is the direction text progresses within a line. For information on line movement direction, see [`NSLineMovementDirection`](/documentation/AppKit/NSLineMovementDirection).

The only values currently used by the supplied typesetters are `NSLineSweepRight` and `NSLineMovesDown`. An `NSTextContainer` subclass should be able to deal with any value, and an `NSTypesetter` subclass should be able to use any of them.

## Topics

### Constants

[`NSLineSweepLeft`](/documentation/AppKit/NSLineSweepDirection/NSLineSweepLeft)

Characters move from right to left.

[`NSLineSweepRight`](/documentation/AppKit/NSLineSweepDirection/NSLineSweepRight)

Characters move from left to right.

[`NSLineSweepDown`](/documentation/AppKit/NSLineSweepDirection/NSLineSweepDown)

Characters move from top to bottom.

[`NSLineSweepUp`](/documentation/AppKit/NSLineSweepDirection/NSLineSweepUp)

Characters move from bottom to top.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)