One Logo Pool Ball
PencilKit · IOS API REFERENCE

PKStrokePoint

struct · iOS 14.0+ · SDK 27.1

struct PKStrokePoint

Members (14)

get · iOS 14.0+

timeOffset

TypeScript
get timeOffset(): number
Swift declaration
var timeOffset: TimeInterval { get }

Time offset since the start of the stroke in seconds.

get · iOS 27.0+

lateralJitter

TypeScript
get lateralJitter(): number
Swift declaration
var lateralJitter: CGFloat { get }

The amount of lateral particle jitter at the stroke edge for supported inks. Lateral jitter applies only to some inks, such as `.pencil`.

get · iOS 17.0+

secondaryScale

TypeScript
get secondaryScale(): number
Swift declaration
var secondaryScale: CGFloat { get }

The scaling of the point for secondary effects.

get · iOS 14.0+

size

TypeScript
get size(): { width: number; height: number }
Swift declaration
var size: CGSize { get }

Size of the point.

get · iOS 14.0+

force

TypeScript
get force(): number
Swift declaration
var force: CGFloat { get }

Force used to create this point.

get · iOS 14.0+

azimuth

TypeScript
get azimuth(): number
Swift declaration
var azimuth: CGFloat { get }

Azimuth of the point in radians, 0.0-2π radians

get · iOS 14.0+

opacity

TypeScript
get opacity(): number
Swift declaration
var opacity: CGFloat { get }

Opacity of the point.

get · iOS 14.0+

altitude

TypeScript
get altitude(): number
Swift declaration
var altitude: CGFloat { get }

Altitude used to create this point in radians, 0.0-π/2 radians

init · iOS 27.0+

init

TypeScript
static initLocationTimeOffsetSizeOpacityForceAzimuthAltitudeSecondaryScaleThresholdLateralJitter(location: { x: number; y: number }, timeOffset: number, size: { width: number; height: number }, opacity: number, force: number, azimuth: number, altitude: number, secondaryScale: number, threshold: number, lateralJitter: number): PKStrokePoint
Swift declaration
init(location: CGPoint, timeOffset: TimeInterval, size: CGSize, opacity: CGFloat, force: CGFloat, azimuth: CGFloat, altitude: CGFloat, secondaryScale: CGFloat, threshold: CGFloat, lateralJitter: CGFloat)

Creates a stroke point with the specified properties, including lateral jitter.

init · iOS 26.0+

init

TypeScript
static initLocationTimeOffsetSizeOpacityForceAzimuthAltitudeSecondaryScaleThreshold(location: { x: number; y: number }, timeOffset: number, size: { width: number; height: number }, opacity: number, force: number, azimuth: number, altitude: number, secondaryScale: number, threshold: number): PKStrokePoint
Swift declaration
init(location: CGPoint, timeOffset: TimeInterval, size: CGSize, opacity: CGFloat, force: CGFloat, azimuth: CGFloat, altitude: CGFloat, secondaryScale: CGFloat, threshold: CGFloat)

Creates a stroke point with the specified properties, including a rendering threshold.

init · iOS 17.0+

init

TypeScript
static initLocationTimeOffsetSizeOpacityForceAzimuthAltitudeSecondaryScale(location: { x: number; y: number }, timeOffset: number, size: { width: number; height: number }, opacity: number, force: number, azimuth: number, altitude: number, secondaryScale: number): PKStrokePoint
Swift declaration
init(location: CGPoint, timeOffset: TimeInterval, size: CGSize, opacity: CGFloat, force: CGFloat, azimuth: CGFloat, altitude: CGFloat, secondaryScale: CGFloat)

Creates a stroke point with the specified properties, including secondary scale.

init · iOS 14.0+

init

TypeScript
static initLocationTimeOffsetSizeOpacityForceAzimuthAltitude(location: { x: number; y: number }, timeOffset: number, size: { width: number; height: number }, opacity: number, force: number, azimuth: number, altitude: number): PKStrokePoint
Swift declaration
init(location: CGPoint, timeOffset: TimeInterval, size: CGSize, opacity: CGFloat, force: CGFloat, azimuth: CGFloat, altitude: CGFloat)

Creates a stroke point with the specified properties.

get · iOS 14.0+

location

TypeScript
get location(): { x: number; y: number }
Swift declaration
var location: CGPoint { get }

Location of the point.

get · iOS 26.0+

threshold

TypeScript
get threshold(): number
Swift declaration
var threshold: CGFloat { get }

The alpha threshold for clipping the stroke rendering for supported inks. Only pixels with an alpha greater than the threshold are drawn. A threshold of `0` has no effect on rendering; a threshold of `1` draws nothing. Thresholds apply only to some inks, such as `.reed`.

Skipped declarations

No declarations were skipped in this snapshot.

All PencilKit types →