Struct surf_n_term::image::Image [−][src]
pub struct Image { /* fields omitted */ }
Arc wrapped RGBA surface with precomputed hash
Implementations
impl Image
[src]
impl Image
[src]pub fn new(surf: impl Surface<Item = RGBA> + Send + Sync + 'static) -> Self
[src]
pub fn new(surf: impl Surface<Item = RGBA> + Send + Sync + 'static) -> Self
[src]Create new image from the RGBA surface
pub fn size_cells(&self, term_size: TerminalSize) -> Size
[src]
pub fn size_cells(&self, term_size: TerminalSize) -> Size
[src]Size in cells
Trait Implementations
impl Ord for Image
[src]
impl Ord for Image
[src]impl PartialOrd<Image> for Image
[src]
impl PartialOrd<Image> for Image
[src]fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Surface for Image
[src]
impl Surface for Image
[src]type Item = RGBA
fn hash(&self) -> u64
[src]
fn get(&self, row: usize, col: usize) -> Option<&Self::Item>
[src]
fn get(&self, row: usize, col: usize) -> Option<&Self::Item>
[src]Get immutable reference to the elemetn specified by row and column
fn iter(&self) -> SurfaceIter<'_, Self::Item>ⓘNotable traits for SurfaceIter<'a, T>
impl<'a, T: 'a> Iterator for SurfaceIter<'a, T> type Item = &'a T;
[src]
fn iter(&self) -> SurfaceIter<'_, Self::Item>ⓘNotable traits for SurfaceIter<'a, T>
impl<'a, T: 'a> Iterator for SurfaceIter<'a, T> type Item = &'a T;
[src]Iterator over immutable references to the items of the view in the row-major order
fn view<RS, CS>(&self, rows: RS, cols: CS) -> SurfaceView<'_, Self::Item> where
RS: ViewBounds,
CS: ViewBounds,
Self: Sized,
[src]
fn view<RS, CS>(&self, rows: RS, cols: CS) -> SurfaceView<'_, Self::Item> where
RS: ViewBounds,
CS: ViewBounds,
Self: Sized,
[src]Create an immutable sub-surface restricted by rows
and cols
bounds.
fn as_ref(&self) -> SurfaceView<'_, Self::Item>
[src]
fn view_owned<RS, CS>(self, rows: RS, cols: CS) -> SurfaceOwnedView<Self> where
RS: ViewBounds,
CS: ViewBounds,
Self: Sized,
[src]
fn view_owned<RS, CS>(self, rows: RS, cols: CS) -> SurfaceOwnedView<Self> where
RS: ViewBounds,
CS: ViewBounds,
Self: Sized,
[src]Create owned sub-surface restricted by rows
and cols
bounds.
fn transpose(self) -> SurfaceOwnedView<Self> where
Self: Sized,
[src]
Self: Sized,
fn map<F, T>(&self, f: F) -> SurfaceOwned<T> where
F: FnMut(usize, usize, &Self::Item) -> T,
Self: Sized,
[src]
F: FnMut(usize, usize, &Self::Item) -> T,
Self: Sized,
fn to_owned_surf(&self) -> SurfaceOwned<Self::Item> where
Self::Item: Clone,
[src]
fn to_owned_surf(&self) -> SurfaceOwned<Self::Item> where
Self::Item: Clone,
[src]Create owned copy of the surface
impl Eq for Image
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl !UnwindSafe for Image
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more