<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFrameRectWithWidthUsingOperation",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@F@NSFrameRectWithWidthUsingOperation"
  },
  "title" : "NSFrameRectWithWidthUsingOperation"
}
-->

# NSFrameRectWithWidthUsingOperation

Draws a bordered rectangle using the specified compositing operation.

```
extern void NSFrameRectWithWidthUsingOperation(NSRect rect, CGFloat frameWidth, NSCompositingOperation op);
```

## Parameters

`rect`

The bounding rectangle (in the current coordinate system) in which to draw.

`frameWidth`

The width of the frame, specified in points.

`op`

The compositing operation to use when drawing the frame.

## Discussion

Draws a frame around the inside of `aRect` in the current color, using the compositing operation `op`. The width is equal to `frameWidth` in the current coordinate system. Since the frame is drawn inside the rectangle, it will be visible even if drawing is clipped to the rectangle.

Because this function does not draw directly on the line, but rather inside it, it uses the current fill color (not stroke color) when drawing.

For more information, see [`NSCompositingOperation`](/documentation/AppKit/NSCompositingOperation).

---

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)