Skip to main content

TableVisualInfo

Struct TableVisualInfo 

Source
#[non_exhaustive]
pub struct TableVisualInfo { pub table_id: usize, pub x: f32, pub y: f32, pub width: f32, pub height: f32, pub column_xs: Vec<f32>, pub column_content_widths: Vec<f32>, pub row_ys: Vec<f32>, pub row_heights: Vec<f32>, }
Expand description

Visual position and size of a laid-out table, and of its rows and columns.

Returned by crate::DocumentFlow::table_visual_info. x / y are the document-space top-left of the whole table box; column_xs and row_ys are measured from that origin, so cell (r, c) occupies (x + column_xs[c], y + row_ys[r], column_content_widths[c], row_heights[r]).

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§table_id: usize

Table ID (matches TableSnapshot::table_id).

§x: f32

Document-space x of the table box’s left edge, in pixels.

§y: f32

Document-space y of the table box’s top edge, in pixels.

§width: f32

Total width of the table, in pixels.

§height: f32

Total height of the table including borders, in pixels.

§column_xs: Vec<f32>

Left edge of each column’s content area, relative to x.

§column_content_widths: Vec<f32>

Width of each column’s content area, in pixels.

§row_ys: Vec<f32>

Top edge of each row’s content area, relative to y.

§row_heights: Vec<f32>

Height of each row’s content area, in pixels.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.