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.
[[["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-05-20 UTC."],[],[],null,["# RoundRectangle\n\nWatch Face Format version Version 4 Version 3 Version 2 Version 1\n\n*** ** * ** ***\n\nDraws a Rectangle with rounded corners.\n\nSyntax\n------\n\n```xml\n\u003cRoundRectangle x=\"float\" y=\"float\" width=\"float\" height=\"float\"\n cornerRadiusX=\"float\" cornerRadiusY=\"float\" /\u003e\n```\n\nAttributes\n----------\n\nThe `RoundRectangle` element must contain the following attributes:\n\n`x`, `y`, `width`, `height`\n\n: A collection of [geometric attributes](/training/wearables/wff/group/part/draw/style/stroke) that specify the rectangle's size\n and position.\n\n These attributes are [transformable](/training/wearables/wff/common/transform/transform).\n\n`cornerRadiusX`, `cornerRadiusY`\n\n: The radius of a circle. This value defines\n the extent to which the corners of the rectangle are rounded.\n\n These attributes are [transformable](/training/wearables/wff/common/transform/transform).\n\nInner elements\n--------------\n\nThe `RoundRectangle` element must contain either a single [`Stroke`](/training/wearables/wff/group/part/draw/style/stroke) element\nor a single [`Fill`](/training/wearables/wff/group/part/draw/style/fill) element.\n\nA rounded rectangle can also optionally contain any number of the following\nelements:\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- [RoundRectangle](/training/wearables/wff/v2/group/part/draw/shape/round-rectangle)\n- [Rectangle](/training/wearables/wff/v2/group/part/draw/shape/rectangle)\n- [Rectangle](/training/wearables/wff/group/part/draw/shape/rectangle)"]]