<!--
{
  "availability" : [
    "macOS: 10.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSliderCell/barRect(flipped:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSliderCell(im)barRectFlipped:"
  },
  "title" : "barRect(flipped:)"
}
-->

# barRect(flipped:)

Returns the rectangle in which the bar is drawn.

```
func barRect(flipped: Bool) -> NSRect
```

## Parameters

`flipped`

<doc://com.apple.documentation/documentation/Swift/true> if the coordinate system of the associated `NSSlider` or `NSMatrix` is flipped; otherwise <doc://com.apple.documentation/documentation/Swift/false>. You can determine whether this is the case by sending the `NSView` message [`isFlipped`](/documentation/AppKit/NSView/isFlipped) message to the `NSMatrix` or `NSSlider`.

## Return Value

The rectangle in which the bar is drawn, specified in the coordinate system of the `NSSlider` or `NSMatrix` with which the receiver is associated. The bar doesn’t include the slider’s bezel or knob.

## Discussion

You can override this method if custom bar artwork requires specific dimensions.

---

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)