Skip to content

TextStudioWritingStroke

StructTextStudioTextStudio
public struct TextStudioWritingStroke

An authored pen-down path. Separate rows represent explicit pen lifts.

TextStudioWritingStroke(TextStudioStackItemId, TextStudioWritingStrokeRole, TextStudioWritingKnot[], bool)

Section titled “TextStudioWritingStroke(TextStudioStackItemId, TextStudioWritingStrokeRole, TextStudioWritingKnot[], bool)”
public TextStudioWritingStroke(TextStudioStackItemId strokeId, TextStudioWritingStrokeRole role, TextStudioWritingKnot[] knots, bool closed = false)

Creates a pen-down stroke with a role, closure flag, and its own copy of the knot array.

Parameters

Name Type
strokeId TextStudio.TextStudioStackItemId
role TextStudio.TextStudioWritingStrokeRole
knots TextStudio.TextStudioWritingKnot[]
closed System.Boolean

public TextStudioWritingKnot GetKnot(int index)

Returns the cubic knot at the specified index, including its pressure, time, and absolute control points.

Parameters

Name Type
index System.Int32

Returns

TextStudio.TextStudioWritingKnot

public TextStudioStackItemId StrokeId { get; }

Returns

TextStudio.TextStudioStackItemId

public TextStudioWritingStrokeRole Role { get; }

Returns

TextStudio.TextStudioWritingStrokeRole

public bool Closed { get; }

Returns

System.Boolean

public int KnotCount { get; }

Returns

System.Int32