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§fn clone(&self) -> TableCellContent
fn clone(&self) -> TableCellContent
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 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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().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.