NSRectFillListWithGrays
Fills the rectangles in the passed list with the passed list of grays.
Declaration
extern void NSRectFillListWithGrays(const NSRect *rects, const CGFloat *grays, NSInteger num);Parameters
- rects:
A pointer to an array of Nsrect structures representing the rectangles to fill.
- grays:
A pointer to an array of floating-point values in the range 0.0 to 1.0, where 0.0 represents absolute black and 1.0 represents absolute white and numbers in between are varying levels of gray. Values outside this range are clamped to 0.0 or 1.0.
- num:
The number of rectangles in the
rectsparameter.
Discussion
Takes a list of num rectangles and a matching list of gray values. The first rectangle is filled with the first gray, the second rectangle with the second gray, and so on. There must be an equal number of rectangles and gray values. The rectangles are composited using the NSCompositeCopy operator and the order in which the rectangles are filled cannot be guaranteed; therefore, overlapping rectangles may not draw as expected. This function alters the current color of the current graphics state, setting it unpredictably to one of the values passed in grays.
For more information, see NSCompositingOperation.