# MLKitDigitalInkRecognition Framework Reference

# StrokePoint

    class StrokePoint : NSObject

A single touch point from the user.
- `


  ### [x](https://developers.google.com/ml-kit/reference/swift/mlkitdigitalinkrecognition/api/reference/Classes/StrokePoint#/c:objc(cs)MLKStrokePoint(py)x)


  ` Horizontal coordinate. Increases to the right.

  #### Declaration

  Swift

      var x: Float { get }

- `


  ### [y](https://developers.google.com/ml-kit/reference/swift/mlkitdigitalinkrecognition/api/reference/Classes/StrokePoint#/c:objc(cs)MLKStrokePoint(py)y)


  ` Vertical coordinate. Increases downward.

  #### Declaration

  Swift

      var y: Float { get }

- `


  ### [t](https://developers.google.com/ml-kit/reference/swift/mlkitdigitalinkrecognition/api/reference/Classes/StrokePoint#/c:objc(cs)MLKStrokePoint(py)t)


  ` Time when the point was recorded, in milliseconds.

  #### Declaration

  Swift

      var t: NSNumber? { get }

- `


  ### [-init](https://developers.google.com/ml-kit/reference/swift/mlkitdigitalinkrecognition/api/reference/Classes/StrokePoint#/c:objc(cs)MLKStrokePoint(im)init)


  ` Unavailable. Use `https://developers.google.com/ml-kit/reference/swift/mlkitdigitalinkrecognition/api/reference/Classes/StrokePoint.html#/c:objc(cs)MLKStrokePoint(im)initWithX:y:t:` instead.
- `


  ### [init(x:y:t:)](https://developers.google.com/ml-kit/reference/swift/mlkitdigitalinkrecognition/api/reference/Classes/StrokePoint#/c:objc(cs)MLKStrokePoint(im)initWithX:y:t:)


  ` Creates a `StrokePoint` object 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

  |---|---|
  | ` x ` | Horizontal coordinate. Increases to the right. |
  | ` y ` | Vertical coordinate. Increases going downward. |
  | ` t ` | Time when the point was recorded, in milliseconds. |

- `


  ### [init(x:y:)](https://developers.google.com/ml-kit/reference/swift/mlkitdigitalinkrecognition/api/reference/Classes/StrokePoint#/c:objc(cs)MLKStrokePoint(im)initWithX:y:)


  ` Creates a `StrokePoint` object 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

  |---|---|
  | ` x ` | horizontal coordinate. Increases to the right. |
  | ` y ` | vertical coordinate. Increases going downward. |