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

# drawMarkers(in:)

Draws the receiver’s markers in `aRect`, which is expressed in the receiver’s coordinate system.

```
func drawMarkers(in rect: NSRect)
```

## Discussion

This method is invoked by [`draw(_:)`](/documentation/AppKit/NSRulerMarker/draw(_:)); you should never need to invoke it directly, but you might want to override it if you want to do something different when drawing markers.

## See Also

[`reservedThicknessForMarkers`](/documentation/AppKit/NSRulerView/reservedThicknessForMarkers)

The room available for ruler markers to `thickness`.



---

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)