pub struct FixedTextBox {
pub text_box: FixedBox,
pub content: ParagraphContent,
pub alignment: TextAlign,
pub font_size: Option<f64>,
pub vertical_align: VerticalAlign,
}Expand description
A text element rendered inside a fixed rectangular area.
Does not participate in PageFlow — layout_mode() returns
LayoutMode::Fixed.
Fields§
§text_box: FixedBox§content: ParagraphContent§alignment: TextAlign§font_size: Option<f64>Override the body font size. None uses DocumentStyle.font_size_body.
vertical_align: VerticalAlignImplementations§
Source§impl FixedTextBox
impl FixedTextBox
Sourcepub fn content_y_start_mm(&self, content_height_mm: f64) -> f64
pub fn content_y_start_mm(&self, content_height_mm: f64) -> f64
Y starting position of the first text line given the rendered content height.
Sourcepub fn effective_font_size(&self, ctx: &RenderContext) -> f64
pub fn effective_font_size(&self, ctx: &RenderContext) -> f64
Effective font size after applying Shrink overflow policy.
Trait Implementations§
Source§impl Clone for FixedTextBox
impl Clone for FixedTextBox
Source§fn clone(&self) -> FixedTextBox
fn clone(&self) -> FixedTextBox
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FixedTextBox
impl Debug for FixedTextBox
Source§impl Element for FixedTextBox
impl Element for FixedTextBox
fn layout_mode(&self) -> LayoutMode
fn estimated_height_mm(&self) -> f64
fn render(&self, ctx: &mut RenderContext) -> Result<RenderResult>
fn as_section_info(&self) -> Option<(u8, &str)>
fn inject_toc_entries(&mut self, _entries: &[TocEntry])
Auto Trait Implementations§
impl Freeze for FixedTextBox
impl RefUnwindSafe for FixedTextBox
impl Send for FixedTextBox
impl Sync for FixedTextBox
impl Unpin for FixedTextBox
impl UnsafeUnpin for FixedTextBox
impl UnwindSafe for FixedTextBox
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.