Stroke.Properties
Stay organized with collections
Save and categorize content based on your preferences.
Represents optional properties of a Stroke
,
e.g., stroke color and width.
Public Method Summary
abstract int |
getColorRgba()
Returns the stroke color as a 32-bit RGBA value.
|
abstract float |
|
Public Methods
public abstract int getColorRgba ()
Returns the stroke color as a 32-bit RGBA value.
Returns the target diameter of the stroke.
This refers to the size of the drawing tool. Although strokes made by the ink engine
often don't have a fixed width we're storing just a single value per stroke here
because it's difficult (and unnecessary) to obtain the per point diameters. The
diameter is given in the same units as the x and y coordinates of the strokes.
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.Properties\n\npublic static interface **Stroke.Properties** \nRepresents optional properties of a [Stroke](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke),\ne.g., stroke color and width. \n\n### Public Method Summary\n\n|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [getColorRgba](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke.Properties#getColorRgba())() Returns the stroke color as a 32-bit RGBA value. |\n| abstract float | [getToolTargetDiameter](/android/reference/com/google/mlkit/vision/digitalink/common/Stroke.Properties#getToolTargetDiameter())() Returns the target diameter of the stroke. |\n\nPublic Methods\n--------------\n\n#### public abstract int **getColorRgba** ()\n\nReturns the stroke color as a 32-bit RGBA value. \n\n#### public abstract float **getToolTargetDiameter** ()\n\nReturns the target diameter of the stroke.\n\nThis refers to the size of the drawing tool. Although strokes made by the ink engine\noften don't have a fixed width we're storing just a single value per stroke here\nbecause it's difficult (and unnecessary) to obtain the per point diameters. The\ndiameter is given in the same units as the x and y coordinates of the strokes."]]