pub enum LayoutContent {
None,
Text(String),
Field {
value: String,
field_kind: FieldKind,
font_size: f64,
font_family: FontFamily,
},
WrappedText {
lines: Vec<String>,
first_line_of_para: Vec<bool>,
font_size: f64,
text_align: TextAlign,
font_family: FontFamily,
space_above_pt: Option<f64>,
space_below_pt: Option<f64>,
from_field: bool,
},
Image {
data: Vec<u8>,
mime_type: String,
},
Draw(DrawContent),
}Expand description
Content type for layout leaf nodes.
Variants§
None
Text(String)
Field
WrappedText
Pre-wrapped text lines for rendering.
Fields
§
font_family: FontFamilyFont family for selecting the correct PDF font resource.
§
space_above_pt: Option<f64>Additional space above the first line of text (from XFA <para spaceAbove>).
Image
A static image.
Draw(DrawContent)
A static draw element (line, rectangle, arc, text).
Trait Implementations§
Source§impl Clone for LayoutContent
impl Clone for LayoutContent
Source§fn clone(&self) -> LayoutContent
fn clone(&self) -> LayoutContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LayoutContent
impl RefUnwindSafe for LayoutContent
impl Send for LayoutContent
impl Sync for LayoutContent
impl Unpin for LayoutContent
impl UnsafeUnpin for LayoutContent
impl UnwindSafe for LayoutContent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more