Pdf.Layout.Stack (ex_pdf_components v1.0.4)

Copy Markdown View Source

Vertical stack layout — children flow top-to-bottom without individual y positions.

Like HTML block elements: only the stack origin uses position, children stack automatically with wrap.

Summary

Functions

Bottom edge relative to stack origin top (position y is negative down from box top).

Measure total height of stacked children in points.

Render stacked children starting at absolute {x, y} on the document.

Functions

extent(style, children, inner_width, doc \\ nil)

@spec extent(map(), list(), number(), any()) :: number()

Bottom edge relative to stack origin top (position y is negative down from box top).

measure(children, inner_width, style \\ %{}, doc \\ nil)

@spec measure(list(), number(), map(), any()) :: number()

Measure total height of stacked children in points.

render(doc, arg, style, children, render_item)

@spec render(any(), {number(), number()}, map(), list(), (any(), any(), map() ->
                                                      any())) :: any()

Render stacked children starting at absolute {x, y} on the document.