pub struct TableCellContent {
pub text: String,
pub bbox: Rect,
pub colspan: usize,
pub rowspan: usize,
pub align: TableCellAlign,
pub valign: TableCellVAlign,
pub is_header: bool,
pub background: Option<(f32, f32, f32)>,
pub font_size: Option<f32>,
pub font_name: Option<String>,
pub bold: bool,
pub italic: bool,
}Expand description
A cell in a table.
Fields§
§text: StringCell text content
bbox: RectBounding box of the cell
colspan: usizeNumber of columns this cell spans
rowspan: usizeNumber of rows this cell spans
align: TableCellAlignHorizontal alignment
valign: TableCellVAlignVertical alignment
is_header: boolWhether this is a header cell
background: Option<(f32, f32, f32)>Background color (R, G, B, each 0.0-1.0)
font_size: Option<f32>Font size
font_name: Option<String>Font name
bold: boolWhether text is bold
italic: boolWhether text is italic
Implementations§
Source§impl TableCellContent
impl TableCellContent
Sourcepub fn with_colspan(self, colspan: usize) -> Self
pub fn with_colspan(self, colspan: usize) -> Self
Set column span.
Sourcepub fn with_rowspan(self, rowspan: usize) -> Self
pub fn with_rowspan(self, rowspan: usize) -> Self
Set row span.
Sourcepub fn with_align(self, align: TableCellAlign) -> Self
pub fn with_align(self, align: TableCellAlign) -> Self
Set horizontal alignment.
Sourcepub fn with_valign(self, valign: TableCellVAlign) -> Self
pub fn with_valign(self, valign: TableCellVAlign) -> Self
Set vertical alignment.
Sourcepub fn with_background(self, r: f32, g: f32, b: f32) -> Self
pub fn with_background(self, r: f32, g: f32, b: f32) -> Self
Set background color.
Sourcepub fn with_font_size(self, size: f32) -> Self
pub fn with_font_size(self, size: f32) -> Self
Set font size.
Sourcepub fn with_italic(self, italic: bool) -> Self
pub fn with_italic(self, italic: bool) -> Self
Set italic.
Trait Implementations§
Source§impl Clone for TableCellContent
impl Clone for TableCellContent
Source§impl Debug for TableCellContent
impl Debug for TableCellContent
Auto Trait Implementations§
impl Freeze for TableCellContent
impl RefUnwindSafe for TableCellContent
impl Send for TableCellContent
impl Sync for TableCellContent
impl Unpin for TableCellContent
impl UnsafeUnpin for TableCellContent
impl UnwindSafe for TableCellContent
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