Convenience Functions

Draw rectangles and other primitive shapes using these convenience functions.

Topics

Drawing Rectangles

NSFrameRect

Draw a bordered rectangle.

NSFrameRectWithWidth

Draw a bordered rectangle.

NSFrameRectWithWidthUsingOperation

Draw a bordered rectangle using the specified compositing operation.

NSEraseRect

Erases the specified rect by filling it with white.

NSRectFill

Fills the passed rectangle with the current color.

NSRectFillList

Fills the rectangles in the passed list with the current fill color.

NSRectFillListUsingOperation

Fills the rectangles in a list using the current fill color and specified compositing operation.

NSRectFillListWithColors

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

NSRectFillListWithColorsUsingOperation

Fills the rectangles in a list using the specified colors and compositing operation.

NSRectFillListWithGrays

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

NSRectFillUsingOperation

Fills a rectangle using the current fill color and the specified compositing operation.

NSDrawTiledRects

Draws rectangles with borders.

NSDrawGroove

Draws a gray-filled rectangle with a groove border.

NSHighlightRect

Highlights the specified rect by filling it with white.

Deprecated

Drawing Bezels

NSDrawDarkBezel

Draws a dark gray-filled rectangle with a bezel border.

NSDrawGrayBezel

Draws a gray-filled rectangle with a bezel border.

NSDrawLightBezel

Draws a white-filled rectangle with a bezel border.

NSDrawWhiteBezel

Draws a white-filled rectangle with a bezel border.

Drawing Backgrounds

NSDrawButton

Draws a gray-filled rectangle representing a user-interface button.

NSDrawWindowBackground

Draws the window’s default background pattern into the specified rectangle of the currently focused view.

Drawing Multipart Images

NSDrawNinePartImage

Draws a nine-part tiled image.

NSDrawThreePartImage

Draws a three-part tiled image.

Clipping Rectangles

NSRectClip

Modifies the current clipping path by intersecting it with the passed rect.

NSRectClipList

Modifies the current clipping path by intersecting it with the passed rect.

Drawing Focus Rings

NSSetFocusRingStyle

Specifies how a focus ring will be drawn.

NSFocusRingPlacement

The focus ring style indicates how the focus ring will be drawn.

NSFocusRingType

The focus ring type is used by NSView and NSCell to configure if and how a control should draw its focus ring.

See Also

Shapes and Paths

NSBezierPath

An object that can create paths using PostScript-style commands.