未验证 提交 55d9090a 编写于 作者: Mr-YX's avatar Mr-YX 提交者: Gitee

Signed-off-by: mr-yx <496043997@qq.com>

上级 afdc4a0f
# Circle # Circle
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -23,12 +23,12 @@ None ...@@ -23,12 +23,12 @@ None
Circle(options?: {width: Length, height: Length}) Circle(options?: {width: Length, height: Length})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. | | options | Object | No | - | For details, see the **options** parameters. |
- options parameters - options parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. | | width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. | | height | Length | Yes | - | Height. |
...@@ -36,7 +36,7 @@ Circle(options?: {width: Length, height: Length}) ...@@ -36,7 +36,7 @@ Circle(options?: {width: Length, height: Length})
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width of the rectangle where the circle is located. | | width | Length | 0 | No | Width of the rectangle where the circle is located. |
| height | Length | 0 | No | Height of the rectangle where the circle is located. | | height | Length | 0 | No | Height of the rectangle where the circle is located. |
...@@ -45,7 +45,7 @@ Circle(options?: {width: Length, height: Length}) ...@@ -45,7 +45,7 @@ Circle(options?: {width: Length, height: Length})
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct CircleExample { struct CircleExample {
...@@ -60,4 +60,4 @@ struct CircleExample { ...@@ -60,4 +60,4 @@ struct CircleExample {
} }
``` ```
![en-us_image_0000001256978353](figures/en-us_image_0000001256978353.png) ![en-us_image_0000001256978353](figures/en-us_image_0000001256978353.png)
\ No newline at end of file
# Ellipse # Ellipse
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -23,12 +23,12 @@ None ...@@ -23,12 +23,12 @@ None
ellipse(options?: {width: Length, height: Length}) ellipse(options?: {width: Length, height: Length})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. | | options | Object | No | - | For details, see the **options** parameters. |
- options parameters - options parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. | | width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. | | height | Length | Yes | - | Height. |
...@@ -36,7 +36,7 @@ ellipse(options?: {width: Length, height: Length}) ...@@ -36,7 +36,7 @@ ellipse(options?: {width: Length, height: Length})
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width of the rectangle where the ellipse is located. | | width | Length | 0 | No | Width of the rectangle where the ellipse is located. |
| height | Length | 0 | No | Height of the rectangle where the ellipse is located. | | height | Length | 0 | No | Height of the rectangle where the ellipse is located. |
...@@ -45,7 +45,7 @@ ellipse(options?: {width: Length, height: Length}) ...@@ -45,7 +45,7 @@ ellipse(options?: {width: Length, height: Length})
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct EllipseExample { struct EllipseExample {
...@@ -60,4 +60,4 @@ struct EllipseExample { ...@@ -60,4 +60,4 @@ struct EllipseExample {
} }
``` ```
![en-us_image_0000001212058488](figures/en-us_image_0000001212058488.png) ![en-us_image_0000001212058488](figures/en-us_image_0000001212058488.png)
\ No newline at end of file
# Line # Line
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -23,12 +23,12 @@ None ...@@ -23,12 +23,12 @@ None
Line(options?: {width: Length, height: Length}) Line(options?: {width: Length, height: Length})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. | | options | Object | No | - | For details, see the **options** parameters. |
- options parameters - options parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. | | width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. | | height | Length | Yes | - | Height. |
...@@ -36,7 +36,7 @@ Line(options?: {width: Length, height: Length}) ...@@ -36,7 +36,7 @@ Line(options?: {width: Length, height: Length})
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width of the rectangle where the straight line is located. | | width | Length | 0 | No | Width of the rectangle where the straight line is located. |
| height | Length | 0 | No | Height of the rectangle where the straight line is located. | | height | Length | 0 | No | Height of the rectangle where the straight line is located. |
...@@ -47,7 +47,7 @@ Line(options?: {width: Length, height: Length}) ...@@ -47,7 +47,7 @@ Line(options?: {width: Length, height: Length})
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct LineExample { struct LineExample {
...@@ -60,4 +60,4 @@ struct LineExample { ...@@ -60,4 +60,4 @@ struct LineExample {
} }
``` ```
![en-us_image_0000001256858387](figures/en-us_image_0000001256858387.jpg) ![en-us_image_0000001256858387](figures/en-us_image_0000001256858387.jpg)
\ No newline at end of file
# Path # Path
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -20,7 +20,7 @@ None ...@@ -20,7 +20,7 @@ None
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width of the rectangle where the path is located. | | width | Length | 0 | No | Width of the rectangle where the path is located. |
| height | Length | 0 | No | Height of the rectangle where the path is located. | | height | Length | 0 | No | Height of the rectangle where the path is located. |
...@@ -57,7 +57,7 @@ For example, the command **M0 20 L50 50 L50 100 Z** defines a path that starts f ...@@ -57,7 +57,7 @@ For example, the command **M0 20 L50 50 L50 100 Z** defines a path that starts f
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct PathExample { struct PathExample {
...@@ -88,4 +88,4 @@ struct PathExample { ...@@ -88,4 +88,4 @@ struct PathExample {
} }
``` ```
![en-us_image_0000001212058492](figures/en-us_image_0000001212058492.png) ![en-us_image_0000001212058492](figures/en-us_image_0000001212058492.png)
\ No newline at end of file
# Polygon # Polygon
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -23,12 +23,12 @@ None ...@@ -23,12 +23,12 @@ None
Polygon(value:{options?: {width: Length, height: Length}}) Polygon(value:{options?: {width: Length, height: Length}})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. | | options | Object | No | - | For details, see the **options** parameters. |
- options parameters - options parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. | | width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. | | height | Length | Yes | - | Height. |
...@@ -36,7 +36,7 @@ Polygon(value:{options?: {width: Length, height: Length}}) ...@@ -36,7 +36,7 @@ Polygon(value:{options?: {width: Length, height: Length}})
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width of the rectangle where the polygon is located. | | width | Length | 0 | No | Width of the rectangle where the polygon is located. |
| height | Length | 0 | No | Height of the rectangle where the polygon is located. | | height | Length | 0 | No | Height of the rectangle where the polygon is located. |
...@@ -46,7 +46,7 @@ Polygon(value:{options?: {width: Length, height: Length}}) ...@@ -46,7 +46,7 @@ Polygon(value:{options?: {width: Length, height: Length}})
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct PolygonExample { struct PolygonExample {
...@@ -65,4 +65,4 @@ struct PolygonExample { ...@@ -65,4 +65,4 @@ struct PolygonExample {
} }
``` ```
![en-us_image_0000001212218458](figures/en-us_image_0000001212218458.gif) ![en-us_image_0000001212218458](figures/en-us_image_0000001212218458.gif)
\ No newline at end of file
# Polyline # Polyline
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -23,12 +23,12 @@ None ...@@ -23,12 +23,12 @@ None
Polyline(options?: {width: Length, height: Length}) Polyline(options?: {width: Length, height: Length})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. | | options | Object | No | - | For details, see the **options** parameters. |
- options parameters - options parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. | | width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. | | height | Length | Yes | - | Height. |
...@@ -36,7 +36,7 @@ Polyline(options?: {width: Length, height: Length}) ...@@ -36,7 +36,7 @@ Polyline(options?: {width: Length, height: Length})
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width of the rectangle where the polyline is located. | | width | Length | 0 | No | Width of the rectangle where the polyline is located. |
| height | Length | 0 | No | Height of the rectangle where the polyline is located. | | height | Length | 0 | No | Height of the rectangle where the polyline is located. |
...@@ -46,7 +46,7 @@ Polyline(options?: {width: Length, height: Length}) ...@@ -46,7 +46,7 @@ Polyline(options?: {width: Length, height: Length})
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct PolylineExample { struct PolylineExample {
...@@ -63,4 +63,4 @@ struct PolylineExample { ...@@ -63,4 +63,4 @@ struct PolylineExample {
} }
``` ```
![en-us_image_0000001212218432](figures/en-us_image_0000001212218432.gif) ![en-us_image_0000001212218432](figures/en-us_image_0000001212218432.gif)
\ No newline at end of file
# Rect # Rect
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -23,12 +23,12 @@ None ...@@ -23,12 +23,12 @@ None
Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;Length&gt;} | {width: Length,height: Length,radiusWidth?: Length,radiusHeight?: Length}}) Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;Length&gt;} | {width: Length,height: Length,radiusWidth?: Length,radiusHeight?: Length}})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. | | options | Object | No | - | For details, see the **options** parameters. |
- options parameters - options parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. | | width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. | | height | Length | Yes | - | Height. |
...@@ -39,7 +39,7 @@ Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;L ...@@ -39,7 +39,7 @@ Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;L
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width. | | width | Length | 0 | No | Width. |
| height | Length | 0 | No | Height. | | height | Length | 0 | No | Height. |
...@@ -51,7 +51,7 @@ Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;L ...@@ -51,7 +51,7 @@ Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;L
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct RectExample { struct RectExample {
...@@ -73,4 +73,4 @@ struct RectExample { ...@@ -73,4 +73,4 @@ struct RectExample {
} }
``` ```
![en-us_image_0000001212218454](figures/en-us_image_0000001212218454.png) ![en-us_image_0000001212218454](figures/en-us_image_0000001212218454.png)
\ No newline at end of file
# Shape # Shape
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
...@@ -29,14 +29,14 @@ The **&lt;Shape&gt;** component can contain child components. ...@@ -29,14 +29,14 @@ The **&lt;Shape&gt;** component can contain child components.
Shape(value:{target?: PixelMap}) Shape(value:{target?: PixelMap})
- Parameters - Parameters
| Name | Type | Mandatory | Default Value | Description | | Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| target | PixelMap | No | null | Shape to draw. You can draw a shape in the specified **PixelMap** object. If no object is specified, the shape is drawn in the current drawing target. | | target | PixelMap | No | null | Shape to draw. You can draw a shape in the specified **PixelMap** object. If no object is specified, the shape is drawn in the current drawing target. |
## Attributes ## Attributes
| Name | Type | Default Value | Mandatory | Description | | Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| viewPort | {<br/>x: Length,<br/>y: Length,<br/>width: Length,<br/>height: Length<br/>} | - | Yes | View port of the shape. | | viewPort | {<br/>x: Length,<br/>y: Length,<br/>width: Length,<br/>height: Length<br/>} | - | Yes | View port of the shape. |
| fill | Color | Black | No | Fill color. | | fill | Color | Black | No | Fill color. |
...@@ -51,7 +51,7 @@ Shape(value:{target?: PixelMap}) ...@@ -51,7 +51,7 @@ Shape(value:{target?: PixelMap})
| antiAlias | boolean | true | No | Whether anti-aliasing is enabled. | | antiAlias | boolean | true | No | Whether anti-aliasing is enabled. |
- LineJoinStyle enums - LineJoinStyle enums
| Name | Description | | Name | Description |
| -------- | -------- | | -------- | -------- |
| Bevel | Bevel is used to connect paths. | | Bevel | Bevel is used to connect paths. |
| Miter | Miter is used to connect paths. | | Miter | Miter is used to connect paths. |
...@@ -61,7 +61,7 @@ Shape(value:{target?: PixelMap}) ...@@ -61,7 +61,7 @@ Shape(value:{target?: PixelMap})
## Example ## Example
``` ```ts
@Entry @Entry
@Component @Component
struct ShapeExample { struct ShapeExample {
...@@ -123,4 +123,4 @@ struct ShapeExample { ...@@ -123,4 +123,4 @@ struct ShapeExample {
} }
``` ```
![en-us_image_0000001257058393](figures/en-us_image_0000001257058393.png) ![en-us_image_0000001257058393](figures/en-us_image_0000001257058393.png)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册