Ink.Point
Stay organized with collections
Save and categorize content based on your preferences.
A single touch point (horizontal and vertical coordinates).
Public Constructor Summary
Public Method Summary
static Ink.Point
|
create(float x, float y)
Creates a new point without specifying timestamp.
|
static Ink.Point
|
create(float x, float y, long timestamp)
Creates a new point.
|
abstract Long
|
getTimestamp()
Time when the point was recorded, in milliseconds.
|
abstract float |
getX()
Horizontal coordinate.
|
abstract float |
getY()
Vertical coordinate.
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
public static Ink.Point
create (float x, float
y)
Creates a new point without specifying 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 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.
Parameters
x |
horizontal coordinate. Increases to the right. |
y |
vertical coordinate. Increases downward. |
public static Ink.Point
create (float x, float y,
long timestamp)
Creates a new point.
Scales on both dimensions are 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.
Parameters
x |
horizontal coordinate. Increases to the right. |
y |
vertical coordinate. Increases downward. |
timestamp |
time when the point was recorded, in milliseconds |
public abstract Long getTimestamp ()
Time when the point was recorded, in milliseconds.
public abstract float getX ()
Horizontal coordinate. Increases to the right.
public abstract float getY ()
Vertical coordinate. Increases to the right.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# Ink.Point\n\npublic static abstract class **Ink.Point** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Point](/android/reference/com/google/mlkit/vision/digitalink/common/Point) \nA single touch point (horizontal and vertical coordinates). \n\n### Public Constructor Summary\n\n|---|------------------------------------------------------------------------------------------------|\n| | [Point](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point#Point())() |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Ink.Point](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point) | [create](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point#create(float,%20float))(float x, float y) Creates a new point without specifying timestamp. |\n| static [Ink.Point](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point) | [create](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point#create(float,%20float,%20long))(float x, float y, long timestamp) Creates a new point. |\n| abstract [Long](//developer.android.com/reference/java/lang/Long.html) | [getTimestamp](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point#getTimestamp())() Time when the point was recorded, in milliseconds. |\n| abstract float | [getX](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point#getX())() Horizontal coordinate. |\n| abstract float | [getY](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point#getY())() Vertical coordinate. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface [com.google.mlkit.vision.digitalink.common.Point](/android/reference/com/google/mlkit/vision/digitalink/common/Point) \n\n|------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Long](//developer.android.com/reference/java/lang/Long.html) | [getTimestamp](/android/reference/com/google/mlkit/vision/digitalink/common/Point#getTimestamp())() Time when the point was recorded, in milliseconds. |\n| abstract float | [getX](/android/reference/com/google/mlkit/vision/digitalink/common/Point#getX())() Horizontal coordinate. |\n| abstract float | [getY](/android/reference/com/google/mlkit/vision/digitalink/common/Point#getY())() Vertical coordinate. |\n\nPublic Constructors\n-------------------\n\n#### public **Point** ()\n\nPublic Methods\n--------------\n\n#### public static [Ink.Point](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point)\n**create** (float x, float y)\n\nCreates a new point without specifying timestamp.\n\nThis method should only be used when it is not feasible to include the timestamp\ninformation, as the recognition accuracy might degrade.\n\nScales on both dimensions are identical: a displacement of 1 horizontally or\nvertically must represent the same distance, as seen by the user.\n\nSpatial origin can be arbitrary as long as it is consistent for a given ink. \n\n##### Parameters\n\n| x | horizontal coordinate. Increases to the right. |\n| y | vertical coordinate. Increases downward. |\n|---|------------------------------------------------|\n\n#### public static [Ink.Point](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Point)\n**create** (float x, float y, long timestamp)\n\nCreates a new point.\n\nScales on both dimensions are identical: a displacement of 1 horizontally or\nvertically must represent the same distance, as seen by the user.\n\nSpatial and temporal origins can be arbitrary as long as they are consistent for a\ngiven ink. \n\n##### Parameters\n\n| x | horizontal coordinate. Increases to the right. |\n| y | vertical coordinate. Increases downward. |\n| timestamp | time when the point was recorded, in milliseconds |\n|-----------|---------------------------------------------------|\n\n#### public abstract [Long](//developer.android.com/reference/java/lang/Long.html) **getTimestamp** ()\n\nTime when the point was recorded, in milliseconds. \n\n#### public abstract float **getX** ()\n\nHorizontal coordinate. Increases to the right. \n\n#### public abstract float **getY** ()\n\nVertical coordinate. Increases to the right."]]