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

# backingAlignedRect(_:options:)

Returns a backing store pixel-aligned rectangle in local view coordinates.

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

## Parameters

`rect`

The rectangle in the view’s interior coordinate system.

`options`

The alignment options. See <doc://com.apple.documentation/documentation/Foundation/AlignmentOptions> for possible values. (Note that although the alignment options specify integral values, the rectangle returned by this method is pixel-aligned.)

## Return Value

A rectangle in the view’s interior coordinate system that is aligned to the backing store pixels using the specified options.

## Discussion

Uses the <doc://com.apple.documentation/documentation/Foundation/NSIntegralRectWithOptions(_:_:)> function and the given input rectangle and options to produce a backing store pixel-aligned rectangle in the view’s interior coordinates.

---

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)