pub struct LayoutSpec {
pub width: Option<u32>,
pub height: Option<u32>,
pub padding: Option<u32>,
pub line_spacing: Option<u32>,
pub align: Option<TextAlign>,
pub v_align: Option<VerticalAlign>,
}Expand description
Layout configuration for the rendering canvas.
Defines the overall size, spacing, and alignment of the output area. All fields are optional and will fall back to theme or default values.
Fieldsยง
ยงwidth: Option<u32>Canvas width in pixels. Determines maximum horizontal space for line wrapping and positioning.
height: Option<u32>Canvas height in pixels. Determines maximum vertical space for rendering content blocks.
padding: Option<u32>Optional padding (in pixels) applied to all sides. Creates spacing between the border and inner content.
line_spacing: Option<u32>Optional line spacing between text lines (in pixels). Affects vertical rhythm and visual readability.
align: Option<TextAlign>Horizontal text alignment:
[Left] | [Center] | [Right].
Applies to each line or block within the canvas.
v_align: Option<VerticalAlign>Vertical alignment of the entire content block:
[Top] | [Middle] | [Bottom].
Controls placement within the total canvas height.