Skip to main content

lower_image_directive

Function lower_image_directive 

Source
pub(crate) fn lower_image_directive(
    document: &mut Document,
    root: NodeId,
    args: &[SetArg],
    span: &SourceSpan,
    source_file: &Path,
    em_pt: f64,
    diagnostics: &mut Vec<Diagnostic>,
)
Expand description

Lower a top-level #image(...) directive into a single [NodeKind::Image] node hanging off the document root. The decoded pixel buffer and pixel dimensions are stashed in attributes so the layout engine and PDF backend don’t have to re-open the source file.