pub struct PlaneGeometry {
pub blitter: Blitter,
pub pixels: Size,
pub pixels_per_cell: Size,
pub max_bitmap_pixels: Option<Size>,
}Expand description
The geometry of a Plane or a terminal.
Fields§
§blitter: BlitterThe selected blitter.
pixels: SizeTotal size, in pixels.
pixels_per_cell: SizeA Cell’s size, in pixels.
max_bitmap_pixels: Option<Size>The largest bitmap size that the terminal is willing to accept.
Or none if bitmaps are not supported.
Implementations§
Source§impl PlaneGeometry
§constructors
impl PlaneGeometry
§constructors
Sourcepub fn from_term(nc: &Notcurses, blitter: Blitter) -> Self
pub fn from_term(nc: &Notcurses, blitter: Blitter) -> Self
Returns the calculated geometry of the terminal using the desired Blitter.
Source§impl PlaneGeometry
§methods
impl PlaneGeometry
§methods
Sourcepub const fn pixels_per_cell(&self) -> Size
pub const fn pixels_per_cell(&self) -> Size
A Cell’s size, in pixels.
Sourcepub fn blits_per_cell(&self) -> Size
pub fn blits_per_cell(&self) -> Size
A Cells size, in blitter blits.
Sourcepub const fn max_bitmap_pixels(&self) -> Option<Size>
pub const fn max_bitmap_pixels(&self) -> Option<Size>
Returns the maximum supported bitmap size, in pixels, or none if bitmaps are not supported.
Sourcepub fn max_bitmap_cells(&self) -> Option<Size>
pub fn max_bitmap_cells(&self) -> Option<Size>
Returns the maximum supported bitmap size, in Cells,
or none if bitmaps are not supported.
Sourcepub fn max_bitmap_blits(&self) -> Option<Size>
pub fn max_bitmap_blits(&self) -> Option<Size>
Returns the maximum supported bitmap size, in blits, using the current blitter, or none if bitmaps are not supported.
Sourcepub fn max_bitmap_blitter(&self, blitter: Blitter) -> Option<Size>
pub fn max_bitmap_blitter(&self, blitter: Blitter) -> Option<Size>
Returns the maximum supported bitmap size, in blits, using the provided blitter,
or none if bitmaps are not supported.
Trait Implementations§
Source§impl Clone for PlaneGeometry
impl Clone for PlaneGeometry
Source§fn clone(&self) -> PlaneGeometry
fn clone(&self) -> PlaneGeometry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlaneGeometry
impl Debug for PlaneGeometry
Source§impl Default for PlaneGeometry
impl Default for PlaneGeometry
Source§fn default() -> PlaneGeometry
fn default() -> PlaneGeometry
Source§impl From<(NcPixelGeometry, Blitter)> for PlaneGeometry
needs both geometry & blitter information.
impl From<(NcPixelGeometry, Blitter)> for PlaneGeometry
needs both geometry & blitter information.