[][src]Struct ffimage::core::iter::PixelIter

pub struct PixelIter<'a, I> {
    pub img: &'a I,
    pub x: u32,
    pub y: u32,
    pub width: u32,
    pub height: u32,
}

An iterator type for images to iterate through pixels

The actual item type (e.g. full object or reference) depends on the implementation. This allows for maximum performance for types which may just reinterpret memory regions as pixels instead of creating them anew for each coordinate pair.

Fields

img: &'a Ix: u32y: u32width: u32height: u32

Implementations

impl<'a, I: GenericImageView<'a>> PixelIter<'a, I>[src]

pub fn new(img: &'a I) -> Self[src]

Returns an iterator which goes through all image pixel rows

Arguments

  • img - An image instance

pub fn with_offset(img: &'a I, x: u32, y: u32) -> Self[src]

Returns an iterator which starts at the specified coordinate offsets

Arguments

  • img - An image instance
  • x - X offset
  • y - Y offset

Trait Implementations

impl<'a, T: Pixel> Iterator for PixelIter<'a, ImageView<'a, T>>[src]

type Item = &'a T

The type of the elements being iterated over.

impl<'a, T: Pixel> Iterator for PixelIter<'a, ImageViewMut<'a, T>>[src]

type Item = &'a T

The type of the elements being iterated over.

impl<'a, T: Pixel> Iterator for PixelIter<'a, ImageBuffer<T>>[src]

type Item = &'a T

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, I> RefUnwindSafe for PixelIter<'a, I> where
    I: RefUnwindSafe

impl<'a, I> Send for PixelIter<'a, I> where
    I: Sync

impl<'a, I> Sync for PixelIter<'a, I> where
    I: Sync

impl<'a, I> Unpin for PixelIter<'a, I>

impl<'a, I> UnwindSafe for PixelIter<'a, I> where
    I: RefUnwindSafe

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> From<T> for T[src]

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ParallelBridge for T where
    T: Send + Iterator,
    <T as Iterator>::Item: Send
[src]

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.