Fills background rectangles with a color.
- iOS 7.0+
- macOS 10.6+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The array of rectangles to fill.
The number of rectangles in
The range of characters whose background rectangles are filled.
The fill color.
This is the primitive method used by
draw, providing a finer-grained override point for actually filling rectangles with a particular background color for a background color attribute, a selected or marked range highlight, a block decoration, or any other rectangle fill needed by that method. As with
color parameters are passed in merely for informational purposes; the color is already set in the graphics state. If for any reason you modify it, you must restore it before returning from this method.
This method operates in terms of character ranges, because the relevant attributes are expressed on characters, and they don't always lie on glyph boundaries—for example, when one character of an “fi” ligature is highlighted.
You should never call this method, but you might override it. The default implementation simply fills the rectangles in the specified array. The graphics operation used for this fill is controlled by a link check; for compatibility reasons, it is
NSComposite for applications linked prior to OS X v10.6 and
NSComposite for applications linked on macOS 10.6 or later. Applications can control the operation used, or modify the drawing, by overriding this method in an