Drawing

Draw shapes, images, and other content on the screen.

Topics

Drawing Contexts

class NSGraphicsContext

An object that represents a graphics context.

Shapes and Paths

class NSBezierPath

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

Convenience Functions

Draw rectangles and other primitive shapes using these convenience functions.

Strings

class NSStringDrawingContext

An object that manages metrics used when drawing attributed strings.

struct NSStringDrawingOptions

Constants for the rendering options for a string when it is drawn.

Gradients

class NSGradient

An object that can draw gradient fill colors

Shadows

class NSShadow

An encapsulation of the attributes used to create a drop shadow during drawing operations.

OpenGL

class NSOpenGLContext

An object that represents an OpenGL graphics context, into which all OpenGL calls are rendered.

Deprecated
class NSOpenGLLayer

A subclass of CAOpenGLLayer that is suitable for rendering OpenGL into layers.

Deprecated
class NSOpenGLPixelFormat

An object that specifies the types of buffers and other attributes of the NSOpenGLContext.

Deprecated
enum NSOpenGLGlobalOption

These constants are option names for NSOpenGLSetOption(_:_:) and NSOpenGLGetOption(_:_:).

Deprecated

See Also

Graphics, Drawing, Color, and Printing

Images and PDF

Create and manage images, in bitmap, PDF, and other formats.

Color

Represent colors using built-in or custom formats, and give users options for selecting and applying colors.

Printing

Display the system print panels and manage the printing process.