Convenience Functions

Draw rectangles and other primitive shapes using these convenience functions.

Topics

Drawing Rectangles

func NSEraseRect(NSRect)

Erases the specified rect by filling it with white.

func NSDrawGroove(NSRect, NSRect)

Draws a gray-filled rectangle with a groove border.

Drawing Bezels

func NSDrawDarkBezel(NSRect, NSRect)

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

func NSDrawGrayBezel(NSRect, NSRect)

Draws a gray-filled rectangle with a bezel border.

func NSDrawLightBezel(NSRect, NSRect)

Draws a white-filled rectangle with a bezel border.

func NSDrawWhiteBezel(NSRect, NSRect)

Draws a white-filled rectangle with a bezel border.

Drawing Backgrounds

func NSDrawButton(NSRect, NSRect)

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

func NSDrawWindowBackground(NSRect)

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

Drawing Focus Rings

func set()

Specifies how a focus ring will be drawn.

enum NSFocusRingPlacement

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

enum 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

class NSBezierPath

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