AI-generated Key Takeaways
-
StrokePointrepresents a single touch point from the user, containing horizontal (x), vertical (y) coordinates, and optionally a timestamp (t). -
Coordinates are in arbitrary but consistent scales, where a unit change in x and y represents the same physical distance.
-
Timestamp
tis recorded in milliseconds and represents the time the point was captured. -
StrokePointcan be initialized with or without a timestamp, but including timestamps is recommended for better recognition accuracy. -
When initializing, spatial origins can be arbitrary but must remain consistent for all points within the same ink.
StrokePoint
class StrokePoint : NSObjectA single touch point from the user.
-
Horizontal coordinate. Increases to the right.
Declaration
Swift
var x: Float { get } -
Vertical coordinate. Increases downward.
Declaration
Swift
var y: Float { get } -
Time when the point was recorded, in milliseconds.
Declaration
Swift
var t: NSNumber? { get } -
Unavailable. Use
init(x:y:t:)instead. -
Creates a
StrokePointobject using the coordinates provided as argument.Scales on both dimensions are arbitrary but be must be identical: a displacement of 1 horizontally or vertically must represent the same distance, as seen by the user.
Spatial and temporal origins can be arbitrary as long as they are consistent for a given ink.
Declaration
Swift
init(x: Float, y: Float, t: Int)Parameters
xHorizontal coordinate. Increases to the right.
yVertical coordinate. Increases going downward.
tTime when the point was recorded, in milliseconds.
-
Creates a
StrokePointobject using the coordinates provided as argument, without specifying a timestamp. This method should only be used when it is not feasible to include the timestamp information, as the recognition accuracy might degrade.Scales on both dimensions are arbitrary but be must be identical: a displacement of 1 horizontally or vertically must represent the same distance, as seen by the user.
Spatial origin can be arbitrary as long as it is consistent for a given ink.
Declaration
Swift
init(x: Float, y: Float)Parameters
xhorizontal coordinate. Increases to the right.
yvertical coordinate. Increases going downward.