The factor that determines the rendering accuracy for curved path segments.
- iOS 3.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The flatness value measures the largest permissible distance (measured in pixels) between a point on the true curve and a point on the rendered curve. Smaller values result in smoother curves but require more computation time. Larger values result in more jagged curves but are rendered much faster. The default flatness value is
In most cases, you should not change the flatness value. However, you might increase the flatness value temporarily to minimize the amount of time it takes to draw a shape temporarily (such as during scrolling).