Stroke
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
Represents a sequence of touch points
between a pen-/finger-down and a pen-/finger-up events.
Represents a sequence of touch points between a pen-/finger-down and a pen-/finger-up
events.
Nested Class Summary
interface
Represents optional properties of a Stroke
,
e.g., stroke color and width.
Public Methods
public abstract List
<? extends Point
>
getPointsInGlobalCoordinates
()
Returns the list of touch points in global coordinates.
Returns optional Stroke.Properties
of a Stroke
.
Based on the properties, the stroke can be treated as either a regular ink stroke,
or a special type, like highlighter.
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,["# Stroke\n\npublic interface **Stroke** \n\n|---|---|---|\n| Known Indirect Subclasses [Ink.Stroke](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Stroke) |--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| | [Ink.Stroke](/android/reference/com/google/mlkit/vision/digitalink/recognition/Ink.Stroke) | Represents a sequence of touch points between a pen-/finger-down and a pen-/finger-up events. | |||\n\nRepresents a sequence of touch points between a pen-/finger-down and a pen-/finger-up\nevents. \n\n### Nested Class Summary\n\n|-----------|---|---|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| interface | [Stroke.Properties](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke.Properties) || Represents optional properties of a [Stroke](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke), e.g., stroke color and width. |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [List](//developer.android.com/reference/java/util/List.html)\\\u003c? extends [Point](/android/reference/com/google/mlkit/vision/digitalink/common/Point)\\\u003e | [getPointsInGlobalCoordinates](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke#getPointsInGlobalCoordinates())() Returns the list of touch points in global coordinates. |\n| abstract [Stroke.Properties](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke.Properties) | [getProperties](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke#getProperties())() Returns optional [Stroke.Properties](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke.Properties) of a [Stroke](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke). |\n\nPublic Methods\n--------------\n\n#### public abstract [List](//developer.android.com/reference/java/util/List.html)\\\u003c? extends [Point](/android/reference/com/google/mlkit/vision/digitalink/common/Point)\\\u003e\n**getPointsInGlobalCoordinates** ()\n\nReturns the list of touch points in global coordinates. \n\n#### public abstract [Stroke.Properties](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke.Properties)\n**getProperties** ()\n\nReturns optional [Stroke.Properties](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke.Properties)\nof a [Stroke](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke).\n\nBased on the properties, the stroke can be treated as either a regular ink stroke,\nor a special type, like highlighter."]]