Contents

NSRectFillListWithColors

Fills the rectangles in the passed list with the passed list of colors.

Declaration

extern void NSRectFillListWithColors(const NSRect *rects, NSColor * const*colors, NSInteger num);

Parameters

  • rects:

    A pointer to an array of Nsrect structures representing the rectangles to fill.

  • colors:

    A pointer to an array of Nscolor objects. The number of color objects in this parameter must equal the number of rectangles in the rects parameter.

  • num:

    The number of rectangles in the rects parameter.

Discussion

Takes a list of num rectangles and a matching list of color objects. The first rectangle is filled with the first color, the second rectangle with the second color, and so on. There must be an equal number of rectangles and color 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 colors.

For more information, see NSCompositingOperation.

See Also

Drawing Rectangles