pub struct TextFlowContext { /* private fields */ }Implementations§
Source§impl TextFlowContext
impl TextFlowContext
pub fn new(page_width: f64, page_height: f64, margins: Margins) -> Self
pub fn set_font(&mut self, font: Font, size: f64) -> &mut Self
pub fn set_line_height(&mut self, multiplier: f64) -> &mut Self
pub fn set_alignment(&mut self, alignment: TextAlign) -> &mut Self
pub fn at(&mut self, x: f64, y: f64) -> &mut Self
pub fn content_width(&self) -> f64
pub fn write_wrapped(&mut self, text: &str) -> Result<&mut Self>
pub fn write_paragraph(&mut self, text: &str) -> Result<&mut Self>
pub fn newline(&mut self) -> &mut Self
pub fn cursor_position(&self) -> (f64, f64)
pub fn generate_operations(&self) -> Vec<u8> ⓘ
Sourcepub fn page_dimensions(&self) -> (f64, f64)
pub fn page_dimensions(&self) -> (f64, f64)
Get the page dimensions
Sourcepub fn line_height(&self) -> f64
pub fn line_height(&self) -> f64
Get current line height multiplier
Sourcepub fn operations(&self) -> &str
pub fn operations(&self) -> &str
Get the operations string
Auto Trait Implementations§
impl Freeze for TextFlowContext
impl RefUnwindSafe for TextFlowContext
impl Send for TextFlowContext
impl Sync for TextFlowContext
impl Unpin for TextFlowContext
impl UnwindSafe for TextFlowContext
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