Engee 文档

盒子

该页面正在翻译中。

具有可选圆角的简单矩形。 这对于直观地对布局的各个部分进行分组或作为占位符非常有用。

属性

对齐模式

默认值为 里面()

矩形在其父GridLayout中的对齐模式。

颜色

默认值为 RGBf(0.9,0.9,0.9)

矩形的颜色。 </无翻译>

using CairoMakie
fig = Figure()
Box(fig[1, 1], color = :red)
Box(fig[1, 2], color = (:red, 0.5))
Box(fig[2, 1], color = RGBf(0.2, 0.5, 0.7))
Box(fig[2, 2], color = RGBAf(0.2, 0.5, 0.7, 0.5))
fig
423e835

角角,角角

默认值为 0.0

圆角的半径。 一个数字表示所有四个角,四个数字表示从右上角顺时针方向。 </无翻译>

using CairoMakie
fig = Figure()
Box(fig[1, 1], cornerradius = 0)
Box(fig[1, 2], cornerradius = 20)
Box(fig[1, 3], cornerradius = (0, 10, 20, 30))
fig
30fc3e0

哈林

默认值为 :中心

矩形在其建议的boundingbox中的水平对齐方式

身高

默认值为 什么都没有

矩形的高度设置。

林泳,林泳

默认值为 什么都没有

矩形边框的linestyle </无翻译>

using CairoMakie
fig = Figure()
Box(fig[1, 1], linestyle = :solid)
Box(fig[1, 2], linestyle = :dot)
Box(fig[1, 3], linestyle = :dash)
fig
a96f640

[医]斯特罗克色

默认值为 RGBf(0,0,0)

边框的颜色。 </无翻译>

using CairoMakie
fig = Figure()
Box(fig[1, 1], strokecolor = :red)
Box(fig[1, 2], strokecolor = (:red, 0.5))
Box(fig[2, 1], strokecolor = RGBf(0.2, 0.5, 0.7))
Box(fig[2, 2], strokecolor = RGBAf(0.2, 0.5, 0.7, 0.5))
fig
50c6955

斯特罗克维斯

默认值为 真的

控制矩形的边框是否可见。

斯特罗克威德斯

默认值为 1.0

矩形边框的线宽。 </无翻译>

using CairoMakie
fig = Figure()
Box(fig[1, 1], strokewidth = 1)
Box(fig[1, 2], strokewidth = 10)
Box(fig[1, 3], strokewidth = 0)
fig
ed8c160

告诉我们

默认值为 真的

控制父布局是否可以调整到此元素的高度

告诉宽度

默认值为 真的

控制父布局是否可以调整到此元素的宽度

n.英勇,英勇

默认值为 :中心

矩形在其建议的boundingbox中的垂直对齐方式

可见

默认值为 真的

控制矩形是否可见。

阔度

默认值为 什么都没有

矩形的宽度设置。

z

默认值为 0.0

设置框的z值