randomSeed
TypeScriptget randomSeed(): numberSwift declarationvar randomSeed: UInt32 { get set }The random seed for drawing strokes that use randomized effects.
struct · iOS 14.0+ · SDK 27.1
struct PKStrokeget randomSeed(): numberSwift declarationvar randomSeed: UInt32 { get set }The random seed for drawing strokes that use randomized effects.
set randomSeed(value: number)Swift declarationvar randomSeed: UInt32 { get set }The random seed for drawing strokes that use randomized effects.
get renderState(): (PKStroke_RenderState) | nullSwift declarationvar renderState: PKStroke.RenderState? { get set }Contains information about the render details (such as particle positioning) of this stroke, which can be useful when manipulating the model in certain ways. For example, this may be set on substrokes returned by `substroke(range:)`. nil uses default rendering.
set renderState(value: (PKStroke_RenderState) | null)Swift declarationvar renderState: PKStroke.RenderState? { get set }Contains information about the render details (such as particle positioning) of this stroke, which can be useful when manipulating the model in certain ways. For example, this may be set on substrokes returned by `substroke(range:)`. nil uses default rendering.
get renderBounds(): { x: number; y: number; width: number; height: number }Swift declarationvar renderBounds: CGRect { get }The bounds of the rendered stroke. This includes the width & ink of the stroke after the transform is applied.
get renderGroupID(): (string) | nullSwift declarationvar renderGroupID: UUID? { get set }Strokes with certain inks (such as marker) can composite to look as if they were drawn while the previous stroke with the same ink was still wet. This UUID may be set to a single value for a run of strokes which should be rendered together in this manner.
set renderGroupID(value: (string) | null)Swift declarationvar renderGroupID: UUID? { get set }Strokes with certain inks (such as marker) can composite to look as if they were drawn while the previous stroke with the same ink was still wet. This UUID may be set to a single value for a run of strokes which should be rendered together in this manner.
get maskedPathRanges(): Array<"animatableData" | SDKHandle>Swift declarationvar maskedPathRanges: [ClosedRange<CGFloat>] { get }These are the parametric parameter ranges of points in `strokePath` that intersect the stroke's mask.
get requiredContentVersion(): PKContentVersionSwift declarationvar requiredContentVersion: PKContentVersion { get }The PencilKit version required to use this stroke.
get id(): stringSwift declarationvar id: UUID { get set }The unique identity of the stroke.
set id(value: string)Swift declarationvar id: UUID { get set }The unique identity of the stroke.
static initInkPathTransformMaskRandomSeedIdRenderGroupIDRenderState(ink: PKInk, path: PKStrokePath, transform?: _CoreFoundation_CGAffineTransform, mask?: (_UIKit_UIBezierPath) | null, randomSeed?: number, id?: string, renderGroupID?: (string) | null, renderState?: (PKStroke_RenderState) | null): PKStrokeSwift declarationinit(ink: PKInk, path: PKStrokePath, transform: CGAffineTransform = .identity, mask: UIBezierPath? = nil, randomSeed: UInt32 = UInt32.random(in: 0...UInt32.max), id: UUID = UUID(), renderGroupID: UUID? = nil, renderState: PKStroke.RenderState? = nil)static initInkPathTransformMaskRandomSeed(ink: PKInk, path: PKStrokePath, transform: _CoreFoundation_CGAffineTransform, mask: (_UIKit_UIBezierPath) | null, randomSeed: number): PKStrokeSwift declarationinit(ink: PKInk, path: PKStrokePath, transform: CGAffineTransform = .identity, mask: UIBezierPath? = nil, randomSeed: UInt32)static initInkPathTransformMask(ink: PKInk, path: PKStrokePath, transform?: _CoreFoundation_CGAffineTransform, mask?: (_UIKit_UIBezierPath) | null): PKStrokeSwift declarationinit(ink: PKInk, path: PKStrokePath, transform: CGAffineTransform = .identity, mask: UIBezierPath? = nil)get ink(): PKInkSwift declarationvar ink: PKInk { get set }The ink used to render this stroke.
set ink(value: PKInk)Swift declarationvar ink: PKInk { get set }The ink used to render this stroke.
get mask(): (_UIKit_UIBezierPath) | nullSwift declarationvar mask: UIBezierPath? { get set }set mask(value: (_UIKit_UIBezierPath) | null)Swift declarationvar mask: UIBezierPath? { get set }get path(): PKStrokePathSwift declarationvar path: PKStrokePath { get set }The B-spline path data that describes this stroke.
set path(value: PKStrokePath)Swift declarationvar path: PKStrokePath { get set }The B-spline path data that describes this stroke.
substroke(range: "animatableData" | SDKHandle): PKStrokeSwift declarationfunc substroke(range: ClosedRange<CGFloat>) -> PKStrokeReturns a copy of this stroke containing the control points in the given range. Maintains information for PencilKit rendering to make the copied part of the stroke render the same as the receiver. The returned stroke may have a `renderState` set to maintain this information. - Parameter range: The range of control points in the receiver to copy to the returned stroke. - Returns: A new stroke containing only the control points within the specified range.
get transform(): _CoreFoundation_CGAffineTransformSwift declarationvar transform: CGAffineTransform { get set }The affine transform of the stroke when rendered.
set transform(value: _CoreFoundation_CGAffineTransform)Swift declarationvar transform: CGAffineTransform { get set }The affine transform of the stroke when rendered.
No declarations were skipped in this snapshot.