---
title: "knobRect(flipped:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsslidercell/knobrect(flipped:)"
---

# knobRect(flipped:)

Returns the rectangle in which the slider knob is drawn.

## Declaration

```swift
func knobRect(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 doc://com.apple.appkit/documentation/AppKit/NSView/isFlipped message to the NSMatrix or NSSlider.

## Return Value

Return Value The rectangle in which the knob is drawn, specified in the coordinate system of the NSSlider or NSMatrix with which the receiver is associated.

## Discussion

Discussion The knob rectangle depends on where in the slider the knob belongs—that is, it depends on the receiver’s minimum and maximum values and on the value the position of the knob will represent.

## See Also

### Displaying the Cell

- [barRect(flipped:)](appkit/nsslidercell/barrect(flipped:).md)
- [drawTickMarks()](appkit/nsslidercell/drawtickmarks().md)
- [drawBar(inside:flipped:)](appkit/nsslidercell/drawbar(inside:flipped:).md)
- [drawKnob()](appkit/nsslidercell/drawknob().md)
- [drawKnob(_:)](appkit/nsslidercell/drawknob(_:).md)
