From 28f05f8bb9ca5ec59821302ec7ccbd2ce6a4075b Mon Sep 17 00:00:00 2001 From: luoying_ace Date: Thu, 29 Sep 2022 07:18:41 +0000 Subject: [PATCH] update zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md. Signed-off-by: luoying_ace --- .../arkui-ts/ts-drawing-components-rect.md | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md index 108921f4a..a7582c53b 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md @@ -58,19 +58,30 @@ Rect(value?: {width?: string | number,height?: string | number,radius?: string | @Component struct RectExample { build() { - Column({ space: 5 }) { - Text('normal').fontSize(9).fontColor(0xCCCCCC).width('90%') - // 绘制90% * 50矩形 + Column({ space: 10 }) { + Text('normal').fontSize(11).fontColor(0xCCCCCC).width('90%') + // 绘制90% * 50的矩形 Rect({ width: '90%', height: 50 }) - // 绘制90% * 50矩形 - Rect().width('90%').height(50) - - Text('with rounded corners').fontSize(9).fontColor(0xCCCCCC).width('90%') - // 绘制90% * 50矩形, 圆角宽高20 - Rect({ width: '90%', height: 50 }).radiusHeight(20).radiusWidth(20) - // 绘制90% * 50矩形, 圆角宽高20 - Rect({ width: '90%', height: 50 }).radius(20) - }.width('100%').margin({ top: 5 }) + .fill(Color.Pink) + // 绘制90% * 50的矩形框 + Rect() + .width('90%') + .height(50) + .fillOpacity(0) + .stroke(Color.Red) + .strokeWidth(3) + + Text('with rounded corners').fontSize(11).fontColor(0xCCCCCC).width('90%') + // 绘制90% * 80的矩形, 圆角宽高分别为40、20 + Rect({ width: '90%', height: 80 }) + .radiusHeight(20) + .radiusWidth(40) + .fill(Color.Pink) + // 绘制90% * 80的矩形, 圆角宽高为20 + Rect({ width: '90%', height: 80 }) + .radius(20) + .fill(Color.Pink) + }.width('100%').margin({ top: 10 }) } } ``` -- GitLab