PKStroke.RenderState
A value that captures the render-time state of a stroke, such as grain texture position.
Declaration
struct RenderStateMentioned in
Overview
Use RenderState to preserve rendering fidelity when you manipulate strokes programmatically. For example, substrokes returned by substroke(range:) may include a renderState so that the extracted portion renders identically to the corresponding section of the original stroke. A value of nil uses default rendering.
The grainOffset property is directly readable and writable. All state, including opaque internal properties, can be persisted by encoding the value using Codable.