pub struct LayoutElement {Show 15 fields
pub x: f64,
pub y: f64,
pub width: f64,
pub height: f64,
pub draw: DrawCommand,
pub children: Vec<LayoutElement>,
pub node_type: Option<String>,
pub resolved_style: Option<ResolvedStyle>,
pub source_location: Option<SourceLocation>,
pub href: Option<String>,
pub bookmark: Option<String>,
pub alt: Option<String>,
pub is_header_row: bool,
pub overflow: Overflow,
pub opacity: f64,
}Expand description
A positioned element on a page.
Fields§
§x: f64Absolute position on the page (top-left corner).
y: f64§width: f64Dimensions including padding and border, excluding margin.
height: f64§draw: DrawCommandThe visual properties to draw.
children: Vec<LayoutElement>Child elements (positioned relative to page, not parent).
node_type: Option<String>Logical node type for dev tools (e.g. “View”, “Text”, “Image”).
resolved_style: Option<ResolvedStyle>Resolved style snapshot for inspector panel.
source_location: Option<SourceLocation>Source code location for click-to-source in the dev inspector.
href: Option<String>Optional hyperlink URL for link annotations.
bookmark: Option<String>Optional bookmark title for PDF outline entries.
alt: Option<String>Optional alt text for images and SVGs (accessibility).
is_header_row: boolWhether this is a table header row (for tagged PDF: TH vs TD).
overflow: OverflowOverflow behavior (Visible or Hidden). When Hidden, PDF clips children.
opacity: f64Opacity for the entire element including its children (0.0–1.0). The
PDF serializer wraps write_element in a q\n/GS{n} gs ... Q block
when this is < 1.0, so descendants render at the cumulative alpha.
Default is 1.0 (no extra wrap).
Trait Implementations§
Source§impl Clone for LayoutElement
impl Clone for LayoutElement
Source§fn clone(&self) -> LayoutElement
fn clone(&self) -> LayoutElement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more