1 Star 0 Fork 5.2K

OpenHarmony-build / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ts-drawing-components-circle.md 8.45 KB
一键复制 编辑 原始数据 按行查看 历史
zengyawen 提交于 2021-11-10 20:02 . add arkui

Circle

圆形绘制组件。

子组件

接口

Circle(options?: {width: Length, height: Length})

  • 参数

    参数名

    参数类型

    必填

    默认值

    参数描述

    options

    Object

    -

    options参数说明

  • options参数说明

    参数名

    参数类型

    必填

    默认值

    参数描述

    width

    Length

    -

    宽度。

    height

    Length

    -

    高度。

属性

参数名称

参数类型

默认值

必填

参数描述

width

Length

0

圆所在矩形的宽度。

height

Length

0

圆所在矩形的高度。

示例

@Entry
@Component
struct CircleExample {
  build() {
    Flex({ justifyContent: FlexAlign.SpaceAround }) {
      // 绘制一个直径为150的圆
      Circle({ width: 150, height: 150 })
      // 绘制一个直径为150的圆
      Circle().width(150).height(150)
    }.width('100%').margin({ top: 5 })
  }
}

1
https://gitee.com/openharmony-build/docs.git
git@gitee.com:openharmony-build/docs.git
openharmony-build
docs
docs
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891