<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/drawing",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Drawing"
}
-->

# Drawing

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

## Topics

### Drawing Contexts

[`class NSGraphicsContext`](/documentation/AppKit/NSGraphicsContext)

An object that represents a graphics context.

### Shapes and Paths

[`class NSBezierPath`](/documentation/AppKit/NSBezierPath)

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

[Convenience Functions](/documentation/AppKit/convenience-functions)

Draw rectangles and other primitive shapes using these convenience functions.

### Strings

[`class NSStringDrawingContext`](/documentation/AppKit/NSStringDrawingContext)

An object that manages metrics for drawing attributed strings.

  <doc://com.apple.documentation/documentation/UIKit/NSStringDrawingOptions>

### Strings

[`class NSStringDrawingContext`](/documentation/AppKit/NSStringDrawingContext)

An object that manages metrics for drawing attributed strings.

[`enum NSStringDrawingOptions : NSInteger;`](/documentation/AppKit/NSStringDrawingOptions)

Constants that specify the rendering options for drawing a string.

### Gradients

[`class NSGradient`](/documentation/AppKit/NSGradient)

An object that can draw gradient fill colors

### Shadows

[`class NSShadow`](/documentation/AppKit/NSShadow)

An object you use to specify attributes to create and style a drop shadow during drawing operations.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)