Contents

PKStroke.RenderState

A value that captures the render-time state of a stroke, such as grain texture position.

Declaration

struct RenderState

Mentioned 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.

Topics

Creating a render state

Getting the render state

Using reference types

Initializers

Instance Methods

See Also

Configuring rendering