CIRCLE
Start from API_LEVEL
2.0. Please refer to API_LEVEL.

Draws a circle with support for color, transparency, and other properties.
Creating UI widgets
import { createWidget, widget } from '@zos/ui'
const circle = createWidget(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 |
Supported Property Access List
| Property | setProperty | getProperty | setter | getter |
|---|---|---|---|---|
| center_x | Y | Y | Y | Y |
| center_y | Y | Y | Y | Y |
| radius | Y | Y | Y | Y |
| color | Y | Y | Y | Y |
| alpha | Y | Y | Y | Y |
Code example
import { createWidget, widget } from '@zos/ui'
Page({
build() {
const circle = createWidget(widget.CIRCLE, {
center_x: 240,
center_y: 240,
radius: 120,
color: 0xfc6950,
alpha: 200
})
}
})