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

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

上级 afdc4a0f
# 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.
......@@ -23,12 +23,12 @@ None
Circle(options?: {width: Length, height: Length})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. |
- options parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. |
......@@ -36,7 +36,7 @@ Circle(options?: {width: Length, height: Length})
## 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. |
| height | Length | 0 | No | Height of the rectangle where the circle is located. |
......@@ -45,7 +45,7 @@ Circle(options?: {width: Length, height: Length})
## Example
```
```ts
@Entry
@Component
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
> ![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.
......@@ -23,12 +23,12 @@ None
ellipse(options?: {width: Length, height: Length})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. |
- options parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. |
......@@ -36,7 +36,7 @@ ellipse(options?: {width: Length, height: Length})
## 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. |
| height | Length | 0 | No | Height of the rectangle where the ellipse is located. |
......@@ -45,7 +45,7 @@ ellipse(options?: {width: Length, height: Length})
## Example
```
```ts
@Entry
@Component
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
> ![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.
......@@ -23,12 +23,12 @@ None
Line(options?: {width: Length, height: Length})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. |
- options parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. |
......@@ -36,7 +36,7 @@ Line(options?: {width: Length, height: Length})
## 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. |
| height | Length | 0 | No | Height of the rectangle where the straight line is located. |
......@@ -47,7 +47,7 @@ Line(options?: {width: Length, height: Length})
## Example
```
```ts
@Entry
@Component
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
> ![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.
......@@ -20,7 +20,7 @@ None
## 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. |
| 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
## Example
```
```ts
@Entry
@Component
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
> ![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.
......@@ -23,12 +23,12 @@ None
Polygon(value:{options?: {width: Length, height: Length}})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. |
- options parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. |
......@@ -36,7 +36,7 @@ Polygon(value:{options?: {width: Length, height: Length}})
## 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. |
| height | Length | 0 | No | Height of the rectangle where the polygon is located. |
......@@ -46,7 +46,7 @@ Polygon(value:{options?: {width: Length, height: Length}})
## Example
```
```ts
@Entry
@Component
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
> ![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.
......@@ -23,12 +23,12 @@ None
Polyline(options?: {width: Length, height: Length})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. |
- options parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. |
......@@ -36,7 +36,7 @@ Polyline(options?: {width: Length, height: Length})
## 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. |
| height | Length | 0 | No | Height of the rectangle where the polyline is located. |
......@@ -46,7 +46,7 @@ Polyline(options?: {width: Length, height: Length})
## Example
```
```ts
@Entry
@Component
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
> ![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.
......@@ -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}})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| options | Object | No | - | For details, see the **options** parameters. |
- options parameters
| Name | Type | Mandatory | Default Value | Description |
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | Yes | - | Width. |
| height | Length | Yes | - | Height. |
......@@ -39,7 +39,7 @@ Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;L
## Attributes
| Name | Type | Default Value | Mandatory | Description |
| Name | Type | Default Value | Mandatory | Description |
| -------- | -------- | -------- | -------- | -------- |
| width | Length | 0 | No | Width. |
| height | Length | 0 | No | Height. |
......@@ -51,7 +51,7 @@ Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array&lt;L
## Example
```
```ts
@Entry
@Component
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
> ![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.
......@@ -29,14 +29,14 @@ The **&lt;Shape&gt;** component can contain child components.
Shape(value:{target?: PixelMap})
- 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. |
## 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. |
| fill | Color | Black | No | Fill color. |
......@@ -51,7 +51,7 @@ Shape(value:{target?: PixelMap})
| antiAlias | boolean | true | No | Whether anti-aliasing is enabled. |
- LineJoinStyle enums
| Name | Description |
| Name | Description |
| -------- | -------- |
| Bevel | Bevel is used to connect paths. |
| Miter | Miter is used to connect paths. |
......@@ -61,7 +61,7 @@ Shape(value:{target?: PixelMap})
## Example
```
```ts
@Entry
@Component
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.
先完成此消息的编辑!
想要评论请 注册