pub struct ParagraphBlock {Show 14 fields
pub lines: Vec<LayoutLine>,
pub space_before: f64,
pub space_after: f64,
pub borders: Option<CT_PBdr>,
pub shading: Option<Color>,
pub indent_left: f64,
pub indent_right: f64,
pub jc: Option<ST_Jc>,
pub keep_next: bool,
pub keep_lines: bool,
pub page_break_before: bool,
pub widow_control: bool,
pub heading_level: Option<u32>,
pub heading_text: Option<String>,
}Expand description
A laid-out paragraph with its lines and spacing.
Fields§
§lines: Vec<LayoutLine>Laid-out lines.
space_before: f64Space before the paragraph in points.
space_after: f64Space after the paragraph in points.
borders: Option<CT_PBdr>Paragraph borders.
shading: Option<Color>Background shading color.
indent_left: f64Left indent in points.
indent_right: f64Right indent in points.
jc: Option<ST_Jc>Paragraph justification.
keep_next: boolKeep with next paragraph.
keep_lines: boolKeep all lines together on one page.
page_break_before: boolForce page break before this paragraph.
widow_control: boolWidow/orphan control.
heading_level: Option<u32>Heading level (1-9) if this is a heading paragraph, for outline generation.
heading_text: Option<String>Heading text for outline generation.
Implementations§
Source§impl ParagraphBlock
impl ParagraphBlock
Sourcepub fn content_height(&self) -> f64
pub fn content_height(&self) -> f64
Total height of the paragraph lines (not including before/after spacing).
Sourcepub fn total_height(&self) -> f64
pub fn total_height(&self) -> f64
Total height including spacing.
Sourcepub fn line_count(&self) -> usize
pub fn line_count(&self) -> usize
Number of lines.
Trait Implementations§
Source§impl Clone for ParagraphBlock
impl Clone for ParagraphBlock
Source§fn clone(&self) -> ParagraphBlock
fn clone(&self) -> ParagraphBlock
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 ParagraphBlock
impl RefUnwindSafe for ParagraphBlock
impl Send for ParagraphBlock
impl Sync for ParagraphBlock
impl Unpin for ParagraphBlock
impl UnsafeUnpin for ParagraphBlock
impl UnwindSafe for ParagraphBlock
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