MLKitDigitalInkRecognition 架構參考資料

MLKStrokePoint


@interface MLKStrokePoint : NSObject

使用者的單一接觸點。

  • x

    水平座標。向右增加。

    聲明

    Objective-C

    @property (nonatomic, readonly) float x;
  • y

    垂直座標。調低音量。

    聲明

    Objective-C

    @property (nonatomic, readonly) float y;
  • t

    記錄點的時間點 (以毫秒為單位)。

    聲明

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *t;
  • 無法使用,請改用 init(x:y:t:)

    聲明

    Objective-C

    - (nonnull instancetype)init;
  • 使用做為引數提供的座標建立 StrokePoint 物件。

    兩個尺寸的縮放都是任意值,但必須相同:水平或垂直偏移 1 的位置必須代表與使用者看到的相同距離。

    空間和時間來源可以任意決定,只要特定墨水{3}一致即可。

    聲明

    Objective-C

    - (nonnull instancetype)initWithX:(float)x y:(float)y t:(long)t;

    參數

    x

    水平座標。向右增加。

    y

    垂直座標。上升量下降。

    t

    記錄點的時間點 (以毫秒為單位)。

  • 使用做為引數提供的座標建立 StrokePoint 物件,而不指定時間戳記。只有在無法納入時間戳記資訊的情況下,才應使用此方法,因為辨識準確率可能會降低。

    兩個尺寸的尺度可以任意指定,但必須相同:水平或垂直捨棄 1 個水平或垂直方向的距離必須等同於使用者看到的相同距離。

    你可以透過任何空間來源指定任意空間來源,只要特定墨水區域一致即可。

    聲明

    Objective-C

    - (nonnull instancetype)initWithX:(float)x y:(float)y;

    參數

    x

    水平座標向右增加。

    y

    垂直座標。上升量下降。