It is a rectangular area. You can define its size, its corners...
const area = canvasUI.view.new("area-1", "area") area.set("size", { width: { unit: "px", value: 150 }, height: { unit: "px", value: 100 }, }) area.set("background", "#f94144") area.set("border", { size: 10, color: "#e03b3d" }) area.set("corner", { type: "round", size: 10 })
It is the size of the view. It is an object with these properties:
Each of these properties is an object with these properties:
"px"
and "%"
.If the unit is "px"
the value will be in px. If it is "%"
the value will be the percentage of its maximum available size.
Its default value is:
{ width: { unit: "px", value: 100 }, height: { unit: "px", value: 100 } }
It is the background color of the view. Its default value is:
"#000"
It is the border of the view. It is an object with these properties:
Its default value is:
{ size: 0, color: "#000" }
It defines how the corners are drawn. It is an object with these properties:
"cut"
to define that the corners have to be cut, and it can also be "round"
to define that the corners have to be rounded.Its default value is:
{ type: "cut", size: 0 }