[][src]Struct alacritty_terminal::term::SizeInfo

pub struct SizeInfo {
    pub width: f32,
    pub height: f32,
    pub cell_width: f32,
    pub cell_height: f32,
    pub padding_x: f32,
    pub padding_y: f32,
    pub dpr: f64,
}

Terminal size info.

Fields

width: f32

Terminal window width.

height: f32

Terminal window height.

cell_width: f32

Width of individual cell.

cell_height: f32

Height of individual cell.

padding_x: f32

Horizontal window padding.

padding_y: f32

Horizontal window padding.

dpr: f64

DPR of the current window.

Implementations

impl SizeInfo[src]

pub fn lines(&self) -> Line[src]

pub fn cols(&self) -> Column[src]

pub fn padding_right(&self) -> usize[src]

pub fn padding_bottom(&self) -> usize[src]

pub fn contains_point(&self, x: usize, y: usize) -> bool[src]

Check if coordinates are inside the terminal grid.

The padding is not counted as part of the grid.

pub fn pixels_to_coords(&self, x: usize, y: usize) -> Point[src]

Trait Implementations

impl Clone for SizeInfo[src]

impl Copy for SizeInfo[src]

impl Debug for SizeInfo[src]

impl<'de> Deserialize<'de> for SizeInfo[src]

impl PartialEq<SizeInfo> for SizeInfo[src]

impl Serialize for SizeInfo[src]

impl StructuralPartialEq for SizeInfo[src]

impl<'a> ToWinsize for &'a SizeInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.