Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["# Line\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nDraws a Line shape.\n\nSyntax\n------\n\n```xml\n\u003cLine startX=\"float\" startY=\"float\" endX=\"float\" endY=\"float\" /\u003e\n```\n\nAttributes\n----------\n\nThe `Line` element must contain the following attributes:\n\n`startX`, `startY`\n\n: The start point of the line.\n\n These attributes are [transformable](/training/wearables/wff/common/transform/transform).\n\n`endX`, `endY`\n\n: The end point of the line.\n\n These attributes are [transformable](/training/wearables/wff/common/transform/transform).\n\nInner elements\n--------------\n\nThe `Line` element must contain either a single [`Stroke`](/training/wearables/wff/group/part/draw/style/stroke) element or [`WeightedStroke`](/training/wearables/wff/group/part/draw/style/weighted-stroke) element.\n\nA line can also optionally contain any number of the following elements:\n\n- [`Transform`](/training/wearables/wff/common/transform/transform)\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Line](/training/wearables/wff/v2/group/part/draw/shape/line)\n- [LinearGradient](/training/wearables/wff/group/part/draw/gradient/linear-gradient)\n- [Rectangle](/training/wearables/wff/group/part/draw/shape/rectangle)"]]