pub struct FrameDecoration {
pub width: Length,
pub height: Length,
pub pads: (Length, Length, Length, Length),
pub elems: Vec<GraphicsElem>,
}Expand description
One block frame’s own decoration, captured at its natural size so a backend with no page grid can still draw it.
The graphics are BOX-LOCAL (origin at the frame’s bottom-left, y up) and
span width x height, which is what lets a reflowable renderer scale
them to whatever width the reader’s window gives the frame. fire_hooks
records one per DecoId the first time that frame fires as a SINGLE
fragment (decoS); a frame split across pages has no whole-frame drawing
and records nothing.
Fields§
§width: Length§height: Length§pads: (Length, Length, Length, Length)The frame’s own paddings, (left, right, top, bottom).
Three of the four are already visible in the flow — indent_left
folds left into every contained line’s x offset, and the two
vertical ones arrive as VertBox::FramePad — so a reflowing renderer
needs only right, which nothing else records: the content is simply
laid out narrower, and once the frame is redrawn at the reader’s own
width a right-aligned line lands on its border.
elems: Vec<GraphicsElem>Trait Implementations§
Source§impl Clone for FrameDecoration
impl Clone for FrameDecoration
Source§fn clone(&self) -> FrameDecoration
fn clone(&self) -> FrameDecoration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more