pub struct ColumnLayout { /* private fields */ }Expand description
Column layout configuration
Implementations§
Source§impl ColumnLayout
impl ColumnLayout
Sourcepub fn new(column_count: usize, total_width: f64, column_gap: f64) -> Self
pub fn new(column_count: usize, total_width: f64, column_gap: f64) -> Self
Create a new column layout with equal column widths
Sourcepub fn with_custom_widths(column_widths: Vec<f64>, column_gap: f64) -> Self
pub fn with_custom_widths(column_widths: Vec<f64>, column_gap: f64) -> Self
Create a new column layout with custom column widths
Sourcepub fn set_options(&mut self, options: ColumnOptions) -> &mut Self
pub fn set_options(&mut self, options: ColumnOptions) -> &mut Self
Set column options
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Get the number of columns
Sourcepub fn total_width(&self) -> f64
pub fn total_width(&self) -> f64
Get the total width
Sourcepub fn column_width(&self, index: usize) -> Option<f64>
pub fn column_width(&self, index: usize) -> Option<f64>
Get column width by index
Sourcepub fn column_x_position(&self, index: usize) -> f64
pub fn column_x_position(&self, index: usize) -> f64
Get the X position of a column
Sourcepub fn create_flow_context(
&self,
start_y: f64,
column_height: f64,
) -> ColumnFlowContext
pub fn create_flow_context( &self, start_y: f64, column_height: f64, ) -> ColumnFlowContext
Create a flow context for managing text across columns
Sourcepub fn render(
&self,
graphics: &mut GraphicsContext,
content: &ColumnContent,
start_x: f64,
start_y: f64,
column_height: f64,
) -> Result<(), PdfError>
pub fn render( &self, graphics: &mut GraphicsContext, content: &ColumnContent, start_x: f64, start_y: f64, column_height: f64, ) -> Result<(), PdfError>
Render column layout with content
Trait Implementations§
Source§impl Clone for ColumnLayout
impl Clone for ColumnLayout
Source§fn clone(&self) -> ColumnLayout
fn clone(&self) -> ColumnLayout
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 ColumnLayout
impl RefUnwindSafe for ColumnLayout
impl Send for ColumnLayout
impl Sync for ColumnLayout
impl Unpin for ColumnLayout
impl UnwindSafe for ColumnLayout
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more