Label
|
Страница в процессе перевода. |
Метка — это текст в ограничивающем прямоугольнике. Атрибуты halign и valign всегда относятся к неповернутым горизонтальной и вертикальной осям. В этом заключается отличие от text, где выравнивание зависит от направления потока текста.
Размер метки известен, поэтому, если для tellwidth и tellheight задано true (значения по умолчанию), блок GridLayout с размерами столбцов и строк Auto может сжаться до нужного размера.
using CairoMakie
fig = Figure()
fig[1:2, 1:3] = [Axis(fig) for _ in 1:6]
supertitle = Label(fig[0, :], "Six plots", fontsize = 30)
sideinfo = Label(fig[1:2, 0], "This text is vertical", rotation = pi/2)
fig
using CairoMakie
f = Figure()
Label(f[1, 1],
"Multiline label\nwith\njustification = :left\nand\nlineheight = 0.9",
justification = :left,
lineheight = 0.9
)
Label(f[1, 2],
"Multiline label\nwith\njustification = :center\nand\nlineheight = 1.1",
justification = :center,
lineheight = 1.1,
color = :dodgerblue,
)
Label(f[1, 3],
"Multiline label\nwith\njustification = :right\nand\nlineheight = 1.3",
justification = :right,
lineheight = 1.3,
color = :firebrick
)
f
Атрибуты
MarkdownAST.Heading(3)
Defaults to Inside()
The align mode of the text in its parent GridLayout.
MarkdownAST.Heading(3)
Defaults to @inherit :textcolor :black
The color of the text.
MarkdownAST.Heading(3)
Defaults to :regular
The font family of the text.
MarkdownAST.Heading(3)
Defaults to @inherit :fontsize 16.0f0
The font size of the text.
MarkdownAST.Heading(3)
Defaults to :center
The horizontal alignment of the text in its suggested boundingbox
MarkdownAST.Heading(3)
Defaults to Auto()
The height setting of the text.
MarkdownAST.Heading(3)
Defaults to :center
The justification of the text (:left, :right, :center).
MarkdownAST.Heading(3)
Defaults to 1.0
The lineheight multiplier for the text.
MarkdownAST.Heading(3)
Defaults to (0.0f0, 0.0f0, 0.0f0, 0.0f0)
The extra space added to the sides of the text boundingbox.
MarkdownAST.Heading(3)
Defaults to 0.0
The counterclockwise rotation of the text in radians.
MarkdownAST.Heading(3)
Defaults to true
Controls if the parent layout can adjust to this element’s height
MarkdownAST.Heading(3)
Defaults to true
Controls if the parent layout can adjust to this element’s width
MarkdownAST.Heading(3)
Defaults to "Text"
The displayed text string.
MarkdownAST.Heading(3)
Defaults to :center
The vertical alignment of the text in its suggested boundingbox
MarkdownAST.Heading(3)
Defaults to true
Controls if the text is visible.
MarkdownAST.Heading(3)
Defaults to Auto()
The width setting of the text.
MarkdownAST.Heading(3)
Defaults to false
Enable word wrapping to the suggested width of the Label.