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

# displayIgnoringOpacity(_:in:)

Causes the view and its descendants to be redrawn to the specified graphics context.

```
func displayIgnoringOpacity(_ rect: NSRect, in context: NSGraphicsContext)
```

## Parameters

`rect`

A rectangle defining the region of the view to be redrawn. It should be specified in the coordinate system of the view.

`context`

The graphics context in which drawing will occur. See the discussion below for more about this parameter.

## Discussion

Acts as [`display()`](/documentation/AppKit/NSView/display()), but confines drawing to `aRect`. This method initiates drawing with the view, even if the view is not opaque. Appropriate scaling factors for the view are obtained from `context`.

If the `context` parameter represents the context for the window containing the view, then all of the necessary transformations are applied. This includes the application of the view’s bounds and frame transforms along with any transforms it inherited from its ancestors. In this situation, the view is also marked as no longer needing an update for the specified rectangle.

If `context` specifies any other graphics context, then only the view’s bounds transform is applied. This means that drawing is not constrained to the view’s visible rectangle. It also means that any dirty rectangles are not cleared, since they are not being redrawn to the window.

---

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)