<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSScreen/backingAlignedRect(_:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScreen(im)backingAlignedRect:options:"
  },
  "title" : "backingAlignedRect(_:options:)"
}
-->

# backingAlignedRect(_:options:)

Converts a rectangle in global screen coordinates to a pixel aligned rectangle.

```
func backingAlignedRect(_ rect: NSRect, options: AlignmentOptions = []) -> NSRect
```

## Parameters

`rect`

The input rectangle in global screen coordinates.

`options`

Specifies the alignment options. See <doc://com.apple.documentation/documentation/Foundation/AlignmentOptions> for possible values.

## Return Value

Returns a a pixel aligned rectangle on the target screen from the given input rectangle in global screen coordinates.

## Discussion

This method uses <doc://com.apple.documentation/documentation/Foundation/NSIntegralRectWithOptions(_:_:)> to produce the pixel aligned rectangle.

---

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)