1e41f4b71Sopenharmony_ci# Path 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciThe **<Path\>** component is used to define a closed shape. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci> **NOTE** 6e41f4b71Sopenharmony_ci> 7e41f4b71Sopenharmony_ci> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci## Child Components 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ciNot supported 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci## APIs 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ciPath(value?: { width?: number | string; height?: number | string; commands?: string }) 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 19e41f4b71Sopenharmony_ci 20e41f4b71Sopenharmony_ci**Parameters** 21e41f4b71Sopenharmony_ci 22e41f4b71Sopenharmony_ci| Name | Type | Mandatory| Description | 23e41f4b71Sopenharmony_ci| -------------------------------------------------- | ---------------- | ---- | ------------------------------------------------------------ | 24e41f4b71Sopenharmony_ci| width | number \| string | No | Width of the rectangle where the path is located.<br>**NOTE**<br>If the value is invalid or the default value is used, the width required for the content is used.| 25e41f4b71Sopenharmony_ci| height | number \| string | No | Height of the rectangle where the path is located.<br>**NOTE**<br>If the value is invalid or the default value is used, the height required for the content is used.| 26e41f4b71Sopenharmony_ci| [commands](ts-drawing-components-path.md#commands) | string | No | Command for drawing the path.<br>Default value: **''**<br>**NOTE**<br>An invalid value is handled as the default value.| 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci## Attributes 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ciIn addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported. 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ci### commands 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_cicommands(value: string) 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ciSets the command string for path drawing. The unit is px. For details about how to convert pixel units, see [Pixel Units](ts-pixel-units.md). 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 39e41f4b71Sopenharmony_ci 40e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 41e41f4b71Sopenharmony_ci 42e41f4b71Sopenharmony_ci**Parameters** 43e41f4b71Sopenharmony_ci 44e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 45e41f4b71Sopenharmony_ci| ------ | ------ | ---- | ----------------------------- | 46e41f4b71Sopenharmony_ci| value | string | Yes | Path for drawing a line.<br>Default value: **''**| 47e41f4b71Sopenharmony_ci 48e41f4b71Sopenharmony_ci### fill 49e41f4b71Sopenharmony_ci 50e41f4b71Sopenharmony_cifill(value: ResourceColor) 51e41f4b71Sopenharmony_ci 52e41f4b71Sopenharmony_ciSets the color of the fill area. An invalid value is handled as the default value. 53e41f4b71Sopenharmony_ci 54e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 55e41f4b71Sopenharmony_ci 56e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 57e41f4b71Sopenharmony_ci 58e41f4b71Sopenharmony_ci**Parameters** 59e41f4b71Sopenharmony_ci 60e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 61e41f4b71Sopenharmony_ci| ------ | ------------------------------------------ | ---- | -------------------------------------- | 62e41f4b71Sopenharmony_ci| value | [ResourceColor](ts-types.md#resourcecolor) | Yes | Color of the fill area.<br>Default value: **Color.Black**| 63e41f4b71Sopenharmony_ci 64e41f4b71Sopenharmony_ci### fillOpacity 65e41f4b71Sopenharmony_ci 66e41f4b71Sopenharmony_cifillOpacity(value: number | string | Resource) 67e41f4b71Sopenharmony_ci 68e41f4b71Sopenharmony_ciSets the opacity of the fill area. The value range is [0.0, 1.0]. If the value passed in is less than **0.0**, the opacity is set to **0.0**. If the value passed in is greater than **1.0**, the opacity is set to **1.0**. Any other value is regarded as **1.0**. 69e41f4b71Sopenharmony_ci 70e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 71e41f4b71Sopenharmony_ci 72e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 73e41f4b71Sopenharmony_ci 74e41f4b71Sopenharmony_ci**Parameters** 75e41f4b71Sopenharmony_ci 76e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 77e41f4b71Sopenharmony_ci| ------ | ------------------------------------------------------------ | ---- | ------------------------------ | 78e41f4b71Sopenharmony_ci| value | number \| string \| [Resource](ts-types.md#resource) | Yes | Opacity of the fill area.<br>Default value: **1**| 79e41f4b71Sopenharmony_ci 80e41f4b71Sopenharmony_ci### stroke 81e41f4b71Sopenharmony_ci 82e41f4b71Sopenharmony_cistroke(value: ResourceColor) 83e41f4b71Sopenharmony_ci 84e41f4b71Sopenharmony_ciSets the stroke color. If this attribute is not set, the component does not have any stroke. If the value is invalid, no stroke will be drawn. 85e41f4b71Sopenharmony_ci 86e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 87e41f4b71Sopenharmony_ci 88e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 89e41f4b71Sopenharmony_ci 90e41f4b71Sopenharmony_ci**Parameters** 91e41f4b71Sopenharmony_ci 92e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 93e41f4b71Sopenharmony_ci| ------ | ------------------------------------------ | ---- | ---------- | 94e41f4b71Sopenharmony_ci| value | [ResourceColor](ts-types.md#resourcecolor) | Yes | Stroke color.| 95e41f4b71Sopenharmony_ci 96e41f4b71Sopenharmony_ci### strokeDashArray 97e41f4b71Sopenharmony_ci 98e41f4b71Sopenharmony_cistrokeDashArray(value: Array<any>) 99e41f4b71Sopenharmony_ci 100e41f4b71Sopenharmony_ciSets the stroke dashes. Line segments may overlap when they intersect. An invalid value is handled as the default value. 101e41f4b71Sopenharmony_ci 102e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 103e41f4b71Sopenharmony_ci 104e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 105e41f4b71Sopenharmony_ci 106e41f4b71Sopenharmony_ci**Parameters** 107e41f4b71Sopenharmony_ci 108e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 109e41f4b71Sopenharmony_ci| ------ | ---------------- | ---- | ------------------------- | 110e41f4b71Sopenharmony_ci| value | Array<any> | Yes | Stroke dashes.<br>Default value: **[]**| 111e41f4b71Sopenharmony_ci 112e41f4b71Sopenharmony_ci### strokeDashOffset 113e41f4b71Sopenharmony_ci 114e41f4b71Sopenharmony_cistrokeDashOffset(value: number | string) 115e41f4b71Sopenharmony_ci 116e41f4b71Sopenharmony_ciSets the line dash offset. An invalid value is handled as the default value. 117e41f4b71Sopenharmony_ci 118e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 119e41f4b71Sopenharmony_ci 120e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 121e41f4b71Sopenharmony_ci 122e41f4b71Sopenharmony_ci**Parameters** 123e41f4b71Sopenharmony_ci 124e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 125e41f4b71Sopenharmony_ci| ------ | -------------------------- | ---- | ------------------------------------ | 126e41f4b71Sopenharmony_ci| value | number \| string | Yes | Line dash offset.<br>Default value: **0**| 127e41f4b71Sopenharmony_ci 128e41f4b71Sopenharmony_ci### strokeLineCap 129e41f4b71Sopenharmony_ci 130e41f4b71Sopenharmony_cistrokeLineCap(value: LineCapStyle) 131e41f4b71Sopenharmony_ci 132e41f4b71Sopenharmony_ciSets the style of end points of lines. 133e41f4b71Sopenharmony_ci 134e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 135e41f4b71Sopenharmony_ci 136e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 137e41f4b71Sopenharmony_ci 138e41f4b71Sopenharmony_ci**Parameters** 139e41f4b71Sopenharmony_ci 140e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 141e41f4b71Sopenharmony_ci| ------ | ------------------------------------------------- | ---- | ------------------------------------------------ | 142e41f4b71Sopenharmony_ci| value | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | Yes | Style of the end points of lines.<br>Default value: **LineCapStyle.Butt**| 143e41f4b71Sopenharmony_ci 144e41f4b71Sopenharmony_ci### strokeLineJoin 145e41f4b71Sopenharmony_ci 146e41f4b71Sopenharmony_cistrokeLineJoin(value: LineJoinStyle) 147e41f4b71Sopenharmony_ci 148e41f4b71Sopenharmony_ciSets the join style of lines. 149e41f4b71Sopenharmony_ci 150e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 151e41f4b71Sopenharmony_ci 152e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 153e41f4b71Sopenharmony_ci 154e41f4b71Sopenharmony_ci**Parameters** 155e41f4b71Sopenharmony_ci 156e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 157e41f4b71Sopenharmony_ci| ------ | --------------------------------------------------- | ---- | -------------------------------------------------- | 158e41f4b71Sopenharmony_ci| value | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | Yes | Join style of lines.<br>Default value: **LineJoinStyle.Miter**| 159e41f4b71Sopenharmony_ci 160e41f4b71Sopenharmony_ci### strokeMiterLimit 161e41f4b71Sopenharmony_ci 162e41f4b71Sopenharmony_cistrokeMiterLimit(value: number | string) 163e41f4b71Sopenharmony_ci 164e41f4b71Sopenharmony_ciSets the limit on the ratio of the miter length to the value of **strokeWidth** used to draw a miter join. The miter length indicates the distance from the outer tip to the inner corner of the miter. This attribute works only when **strokeLineJoin** is set to **LineJoinStyle.Miter**. 165e41f4b71Sopenharmony_ci 166e41f4b71Sopenharmony_ciThe value must be greater than or equal to 1.0. If the value is in the [0, 1) range, the value **1.0** will be used. In other cases, the default value will be used. 167e41f4b71Sopenharmony_ci 168e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 169e41f4b71Sopenharmony_ci 170e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 171e41f4b71Sopenharmony_ci 172e41f4b71Sopenharmony_ci**Parameters** 173e41f4b71Sopenharmony_ci 174e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 175e41f4b71Sopenharmony_ci| ------ | -------------------------- | ---- | ---------------------------------------------- | 176e41f4b71Sopenharmony_ci| value | number \| string | Yes | Limit on the ratio of the miter length to the value of **strokeWidth** used to draw a miter join.<br>Default value: **4**| 177e41f4b71Sopenharmony_ci 178e41f4b71Sopenharmony_ci### strokeOpacity 179e41f4b71Sopenharmony_ci 180e41f4b71Sopenharmony_cistrokeOpacity(value: number | string | Resource) 181e41f4b71Sopenharmony_ci 182e41f4b71Sopenharmony_ciSets the stroke opacity. The value range is [0.0, 1.0]. If the value passed in is less than **0.0**, the opacity is set to **0.0**. If the value passed in is greater than **1.0**, the opacity is set to **1.0**. Any other value is regarded as **1.0**. 183e41f4b71Sopenharmony_ci 184e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 185e41f4b71Sopenharmony_ci 186e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 187e41f4b71Sopenharmony_ci 188e41f4b71Sopenharmony_ci**Parameters** 189e41f4b71Sopenharmony_ci 190e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 191e41f4b71Sopenharmony_ci| ------ | ------------------------------------------------------------ | ---- | -------------------------- | 192e41f4b71Sopenharmony_ci| value | number \| string \| [Resource](ts-types.md#resource) | Yes | Stroke opacity.<br>Default value: **1**| 193e41f4b71Sopenharmony_ci 194e41f4b71Sopenharmony_ci### strokeWidth 195e41f4b71Sopenharmony_ci 196e41f4b71Sopenharmony_cistrokeWidth(value: Length) 197e41f4b71Sopenharmony_ci 198e41f4b71Sopenharmony_ciSets the stroke width. If of the string type, this attribute cannot be set in percentage. A percentage is processed as 1 px. 199e41f4b71Sopenharmony_ci 200e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 201e41f4b71Sopenharmony_ci 202e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 203e41f4b71Sopenharmony_ci 204e41f4b71Sopenharmony_ci**Parameters** 205e41f4b71Sopenharmony_ci 206e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 207e41f4b71Sopenharmony_ci| ------ | ---------------------------- | ---- | ------------------------ | 208e41f4b71Sopenharmony_ci| value | [Length](ts-types.md#length) | Yes | Stroke width.<br>Default value: **1**| 209e41f4b71Sopenharmony_ci 210e41f4b71Sopenharmony_ci### antiAlias 211e41f4b71Sopenharmony_ci 212e41f4b71Sopenharmony_ciantiAlias(value: boolean) 213e41f4b71Sopenharmony_ci 214e41f4b71Sopenharmony_ciSpecifies whether anti-aliasing is enabled. 215e41f4b71Sopenharmony_ci 216e41f4b71Sopenharmony_ci**Widget capability**: This API can be used in ArkTS widgets since API version 9. 217e41f4b71Sopenharmony_ci 218e41f4b71Sopenharmony_ci**System capability**: SystemCapability.ArkUI.ArkUI.Full 219e41f4b71Sopenharmony_ci 220e41f4b71Sopenharmony_ci**Parameters** 221e41f4b71Sopenharmony_ci 222e41f4b71Sopenharmony_ci| Name| Type | Mandatory| Description | 223e41f4b71Sopenharmony_ci| ------ | ------- | ---- | ------------------------------------- | 224e41f4b71Sopenharmony_ci| value | boolean | Yes | Whether anti-aliasing is enabled.<br>Default value: **true**| 225e41f4b71Sopenharmony_ci 226e41f4b71Sopenharmony_ci## Commands 227e41f4b71Sopenharmony_ci 228e41f4b71Sopenharmony_ciThe supported commands are as follows: 229e41f4b71Sopenharmony_ci 230e41f4b71Sopenharmony_ci| Command | Name | Parameter | Description | 231e41f4b71Sopenharmony_ci| ---- | -------------------------------- | ---------------------------------------- | ---------------------------------------- | 232e41f4b71Sopenharmony_ci| M | moveto | (x y) | Starts a new subpath at the point specified by the given (x, y) coordinates. For example, `M 0 0` starts a new subpath at point (0, 0).| 233e41f4b71Sopenharmony_ci| L | lineto | (x y) | Draws a line from the current point to the point specified by the given (x, y) coordinates. The specified point becomes the start point of the new subpath. For example, `L 50 50` draws a line from the current point to point (50, 50), which is the start point of the new subpath.| 234e41f4b71Sopenharmony_ci| H | horizontal lineto | x | Draws a horizontal line from the current point. This command is equivalent to the **L** command where the y-coordinate is 0. For example, `H 50 ` draws a line from the current point to point (50, 0), which is the start point of the new subpath.| 235e41f4b71Sopenharmony_ci| V | vertical lineto | y | Draws a vertical line from the current point. This command is equivalent to the **L** command where the x-coordinate is 0. For example, `V 50 ` draws a line from the current point to point (0, 50), which is the start point of the new subpath.| 236e41f4b71Sopenharmony_ci| C | curveto | (x1 y1 x2 y2 x y) | Draws a cubic Bezier curve from the current point to the point specified by the given (x, y) coordinates, with (x1, y1) as the control point of the curve start point and (x2, y2) as the control point of the curve end point. For example, `C100 100 250 100 250 200 ` draws a cubic Bezier curve from the current point to point (250, 200), which is the start point of the new subpath.| 237e41f4b71Sopenharmony_ci| S | smooth curveto | (x2 y2 x y) | Draws a cubic Bezier curve from the current point to the point specified by the given (x, y) coordinates, with (x2, y2) as the control point of the curve end point. If the previous command is **C** or **S**, the control point of the curve start point is the mapping of the control point of the curve end point in the previous command relative to the start point. For example, in `C100 100 250 100 250 200 S400 300 400 200`, the second segment of the cubic Bezier curve uses point (250, 300) as the control point of the curve start point. If there is no previous command or the previous command is not **C** or **S**, the control point of the curve start point coincides with the current point.| 238e41f4b71Sopenharmony_ci| Q | quadratic Belzier curve | (x1 y1 x y) | Draws a quadratic Bezier curve from the current point to the point specified by the given (x, y) coordinates, with (x1, y1) as the control point. For example, `Q400 50 600 300` draws a quadratic Bezier curve from the current point to point (600, 300), which is the start point of the new subpath.| 239e41f4b71Sopenharmony_ci| T | smooth quadratic Belzier curveto | (x y) | Draws a quadratic Bezier curve from the current point to the point specified by the given (x, y) coordinates. If the previous command is **Q** or **T**, the control point is the mapping of the control point of the curve end point in the previous command relative to the start point. For example, in `Q400 50 600 300 T1000 300`, the second segment of the quadratic Bezier curve uses point (800, 350) as the control point. If there is no previous command or the previous command is not **Q** or **T**, the control point of the curve start point coincides with the current point.| 240e41f4b71Sopenharmony_ci| A | elliptical Arc | (rx ry x-axis-rotation large-arc-flag sweep-flag x y) | Draws an elliptical arc from the current point to the point specified by the given (x, y) coordinates. **(rx, ry)** and **x-axis-rotation** define the size and direction of the arc, indicating how the arc rotates relative to the current coordinate system (in degrees). **large-arc-flag** and **sweep-flag** define how the arc is drawn.| 241e41f4b71Sopenharmony_ci| Z | closepath | none | Closes the current subpath by connecting the current path back to the initial point of the current subpath. | 242e41f4b71Sopenharmony_ci 243e41f4b71Sopenharmony_ciFor example, **commands('M0 20 L50 50 L50 100 Z')** defines a triangle that starts from position (0, 20), by drawing a line from point (0, 20) to point (50, 50), then a line from point (50, 50) to point (50, 100), and finally a line from point (50, 100) to point (0, 20). 244e41f4b71Sopenharmony_ci 245e41f4b71Sopenharmony_ci## Example 246e41f4b71Sopenharmony_ci 247e41f4b71Sopenharmony_ci```ts 248e41f4b71Sopenharmony_ci// xxx.ets 249e41f4b71Sopenharmony_ci@Entry 250e41f4b71Sopenharmony_ci@Component 251e41f4b71Sopenharmony_cistruct PathExample { 252e41f4b71Sopenharmony_ci build() { 253e41f4b71Sopenharmony_ci Column({ space: 10 }) { 254e41f4b71Sopenharmony_ci Text('Straight line') 255e41f4b71Sopenharmony_ci .fontSize(11) 256e41f4b71Sopenharmony_ci .fontColor(0xCCCCCC) 257e41f4b71Sopenharmony_ci .width('90%') 258e41f4b71Sopenharmony_ci // Draw a straight line whose length is 600 px and width is 3 vp. 259e41f4b71Sopenharmony_ci Path() 260e41f4b71Sopenharmony_ci .width('600px') 261e41f4b71Sopenharmony_ci .height('10px') 262e41f4b71Sopenharmony_ci .commands('M0 0 L600 0') 263e41f4b71Sopenharmony_ci .stroke(Color.Black) 264e41f4b71Sopenharmony_ci .strokeWidth(3) 265e41f4b71Sopenharmony_ci 266e41f4b71Sopenharmony_ci Text('Straight line graph') 267e41f4b71Sopenharmony_ci .fontSize(11) 268e41f4b71Sopenharmony_ci .fontColor(0xCCCCCC) 269e41f4b71Sopenharmony_ci .width('90%') 270e41f4b71Sopenharmony_ci // Draw a straight line. 271e41f4b71Sopenharmony_ci Flex({ justifyContent: FlexAlign.SpaceBetween }) { 272e41f4b71Sopenharmony_ci Path() 273e41f4b71Sopenharmony_ci .width('210px') 274e41f4b71Sopenharmony_ci .height('310px') 275e41f4b71Sopenharmony_ci .commands('M100 0 L200 240 L0 240 Z') 276e41f4b71Sopenharmony_ci .fillOpacity(0) 277e41f4b71Sopenharmony_ci .stroke(Color.Black) 278e41f4b71Sopenharmony_ci .strokeWidth(3) 279e41f4b71Sopenharmony_ci Path() 280e41f4b71Sopenharmony_ci .width('210px') 281e41f4b71Sopenharmony_ci .height('310px') 282e41f4b71Sopenharmony_ci .commands('M0 0 H200 V200 H0 Z') 283e41f4b71Sopenharmony_ci .fillOpacity(0) 284e41f4b71Sopenharmony_ci .stroke(Color.Black) 285e41f4b71Sopenharmony_ci .strokeWidth(3) 286e41f4b71Sopenharmony_ci Path() 287e41f4b71Sopenharmony_ci .width('210px') 288e41f4b71Sopenharmony_ci .height('310px') 289e41f4b71Sopenharmony_ci .commands('M100 0 L0 100 L50 200 L150 200 L200 100 Z') 290e41f4b71Sopenharmony_ci .fillOpacity(0) 291e41f4b71Sopenharmony_ci .stroke(Color.Black) 292e41f4b71Sopenharmony_ci .strokeWidth(3) 293e41f4b71Sopenharmony_ci }.width('95%') 294e41f4b71Sopenharmony_ci 295e41f4b71Sopenharmony_ci Text('Curve graphics').fontSize(11).fontColor(0xCCCCCC).width('90%') 296e41f4b71Sopenharmony_ci // Draw an arc. 297e41f4b71Sopenharmony_ci Flex({ justifyContent: FlexAlign.SpaceBetween }) { 298e41f4b71Sopenharmony_ci Path() 299e41f4b71Sopenharmony_ci .width('250px') 300e41f4b71Sopenharmony_ci .height('310px') 301e41f4b71Sopenharmony_ci .commands("M0 300 S100 0 240 300 Z") 302e41f4b71Sopenharmony_ci .fillOpacity(0) 303e41f4b71Sopenharmony_ci .stroke(Color.Black) 304e41f4b71Sopenharmony_ci .strokeWidth(3) 305e41f4b71Sopenharmony_ci Path() 306e41f4b71Sopenharmony_ci .width('210px') 307e41f4b71Sopenharmony_ci .height('310px') 308e41f4b71Sopenharmony_ci .commands('M0 150 C0 100 140 0 200 150 L100 300 Z') 309e41f4b71Sopenharmony_ci .fillOpacity(0) 310e41f4b71Sopenharmony_ci .stroke(Color.Black) 311e41f4b71Sopenharmony_ci .strokeWidth(3) 312e41f4b71Sopenharmony_ci Path() 313e41f4b71Sopenharmony_ci .width('210px') 314e41f4b71Sopenharmony_ci .height('310px') 315e41f4b71Sopenharmony_ci .commands('M0 100 A30 20 20 0 0 200 100 Z') 316e41f4b71Sopenharmony_ci .fillOpacity(0) 317e41f4b71Sopenharmony_ci .stroke(Color.Black) 318e41f4b71Sopenharmony_ci .strokeWidth(3) 319e41f4b71Sopenharmony_ci }.width('95%') 320e41f4b71Sopenharmony_ci }.width('100%') 321e41f4b71Sopenharmony_ci .margin({ top: 5 }) 322e41f4b71Sopenharmony_ci } 323e41f4b71Sopenharmony_ci} 324e41f4b71Sopenharmony_ci``` 325e41f4b71Sopenharmony_ci 326e41f4b71Sopenharmony_ci 327