CIRCLE
Draws a circle with support for color, transparency, and other properties.
Creating UI components
const circle = hmUI.createWidget(hmUI.widget.CIRCLE, Param)
Type
Param: object
Properties | Description | Required | Type |
---|---|---|---|
center_x | Center of circle x. | YES | number |
center_y | Center of circle y. | YES | number |
radius | Radius. | YES | number |
color | Color 16-increment value. | YES | number |
alpha | Transparency.[0-255] 0 for full transparency | NO | number |
Code example
Page({
build() {
const circle = hmUI.createWidget(hmUI.widget.CIRCLE, {
center_x: 240,
center_y: 240,
radius: 120,
color: 0xfc6950,
alpha: 200
})
}
})