[][src]Struct piet_embedded_graphics::batch::BlockIterator

pub struct BlockIterator<R: Iterator<Item = PixelRow>> {
    rows: R,
    x_left: u8,
    x_right: u8,
    y_top: u8,
    y_bottom: u8,
    colors: Vec<u16, U100>,
    first_row: bool,
}

Iterator for each Pixel Block in the pixel data. A Pixel Block consists of contiguous Pixel Rows with the same start and end column number.

Fields

rows: R

Pixel Rows to be batched into blocks

x_left: u8

Start column number

x_right: u8

End column number

y_top: u8

Start row number

y_bottom: u8

End row number

colors: Vec<u16, U100>

List of pixel colours for the entire block, row by row

first_row: bool

True if this is the first row for the block

Trait Implementations

impl<R: Clone + Iterator<Item = PixelRow>> Clone for BlockIterator<R>[src]

impl<R: Debug + Iterator<Item = PixelRow>> Debug for BlockIterator<R>[src]

impl<R: Iterator<Item = PixelRow>> Iterator for BlockIterator<R>[src]

Implement the Iterator for Pixel Blocks. R can be any Pixel Row Iterator.

type Item = PixelBlock

This Iterator returns Pixel Blocks

fn next(&mut self) -> Option<Self::Item>[src]

Return the next Pixel Block of contiguous Pixel Rows with the same start and end column number

Auto Trait Implementations

impl<R> Send for BlockIterator<R> where
    R: Send

impl<R> Sync for BlockIterator<R> where
    R: Sync

impl<R> Unpin for BlockIterator<R> where
    R: Unpin

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

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 
[src]

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

type Output = T

Should always be Self

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.