---
title: "NSDrawColorTiledRects(_:_:_:_:_:)"
framework: appkit
role: symbol
role_heading: Function
path: "appkit/nsdrawcolortiledrects(_:_:_:_:_:)"
---

# NSDrawColorTiledRects(_:_:_:_:_:)

Draws a single-color, bordered rectangle.

## Declaration

```swift
func NSDrawColorTiledRects(_ boundsRect: NSRect, _ clipRect: NSRect, _ sides: UnsafePointer<NSRectEdge>, _ colors: AutoreleasingUnsafeMutablePointer<NSColor>, _ count: Int) -> NSRect
```

## Parameters

- `boundsRect`: The bounding rectangle (in the current coordinate system) in which to draw. Since this function is often used to draw the border of a view, this rectangle will typically be that view’s bounds rectangle. Only those parts of boundsRect that lie within the clipRect are actually drawn.
- `clipRect`: The clipping rectangle to use during drawing.
- `sides`: The sides of the rectangle for which you want to specify custom colors. Each side must have a corresponding entry in the colors parameter.
- `colors`: The colors to draw for each of the edges listed in the sides parameter.
- `count`: The number of 1.0-unit-wide slices to draw on the specified sides.

## Return Value

Return Value The rectangle that lies within the resulting border.

## Discussion

Discussion Behaves the same as NSDrawTiledRects(_:_:_:_:_:) except it draws its border using colors from the colors array.

## See Also

### Functions

- [NSConvertGlyphsToPackedGlyphs(_:_:_:_:)](appkit/nsconvertglyphstopackedglyphs(_:_:_:_:).md)
- [raiseBadArgumentException(_:_:_:)](appkit/nsaccessibility-swift.struct/raisebadargumentexception(_:_:_:).md)
- [NSReleaseAlertPanel(_:)](appkit/nsreleasealertpanel(_:).md)
- [NSDisableScreenUpdates()](appkit/nsdisablescreenupdates().md)
- [NSEnableScreenUpdates()](appkit/nsenablescreenupdates().md)
- [NSSetShowsServicesMenuItem(_:_:)](appkit/nssetshowsservicesmenuitem(_:_:).md)
- [NSCopyBits(_:_:_:)](appkit/nscopybits(_:_:_:).md)
- [NSShowsServicesMenuItem(_:)](appkit/nsshowsservicesmenuitem(_:).md)
- [NSDottedFrameRect(_:)](appkit/nsdottedframerect(_:).md)
- [NSReadPixel(_:)](appkit/nsreadpixel(_:).md)
- [NSGetWindowServerMemory(_:_:_:_:)](appkit/nsgetwindowservermemory(_:_:_:_:).md)
- [fileContentsType(forPathExtension:)](appkit/nspasteboard/pasteboardtype/filecontentstype(forpathextension:).md)
- [fileNameType(forPathExtension:)](appkit/nspasteboard/pasteboardtype/filenametype(forpathextension:).md)
- [representedPathExtension](appkit/nspasteboard/pasteboardtype/representedpathextension.md)
- [representedPathExtensions(from:)](appkit/nspasteboard/pasteboardtype/representedpathextensions(from:).md)
