Skip to main content

ImageAccessorWrap

Struct ImageAccessorWrap 

Source
pub struct ImageAccessorWrap<'a, const PIX_WIDTH: usize, WX: WrapMode, WY: WrapMode> { /* private fields */ }
Expand description

Image accessor with tiling: wraps coordinates using WrapMode policies.

Port of C++ image_accessor_wrap<PixFmt, WrapX, WrapY>.

Implementations§

Source§

impl<'a, const PIX_WIDTH: usize, WX: WrapMode, WY: WrapMode> ImageAccessorWrap<'a, PIX_WIDTH, WX, WY>

Source

pub fn new(rbuf: &'a RowAccessor) -> Self

Source

pub fn span(&mut self, x: i32, y: i32, _len: u32) -> &[u8]

Source

pub fn next_x(&mut self) -> &[u8]

Source

pub fn next_y(&mut self) -> &[u8]

Trait Implementations§

Source§

impl<const PIX_WIDTH: usize, WX: WrapMode, WY: WrapMode> ImageSource for ImageAccessorWrap<'_, PIX_WIDTH, WX, WY>

Source§

fn span(&mut self, x: i32, y: i32, len: u32) -> &[u8]

Begin reading a span at (x, y) with len pixels. Returns first pixel.
Source§

fn next_x(&mut self) -> &[u8]

Advance to the next pixel in the x direction.
Source§

fn next_y(&mut self) -> &[u8]

Advance to the next row (y+1), resetting x to the span start.

Auto Trait Implementations§

§

impl<'a, const PIX_WIDTH: usize, WX, WY> Freeze for ImageAccessorWrap<'a, PIX_WIDTH, WX, WY>
where WX: Freeze, WY: Freeze,

§

impl<'a, const PIX_WIDTH: usize, WX, WY> RefUnwindSafe for ImageAccessorWrap<'a, PIX_WIDTH, WX, WY>

§

impl<'a, const PIX_WIDTH: usize, WX, WY> !Send for ImageAccessorWrap<'a, PIX_WIDTH, WX, WY>

§

impl<'a, const PIX_WIDTH: usize, WX, WY> !Sync for ImageAccessorWrap<'a, PIX_WIDTH, WX, WY>

§

impl<'a, const PIX_WIDTH: usize, WX, WY> Unpin for ImageAccessorWrap<'a, PIX_WIDTH, WX, WY>
where WX: Unpin, WY: Unpin,

§

impl<'a, const PIX_WIDTH: usize, WX, WY> UnwindSafe for ImageAccessorWrap<'a, PIX_WIDTH, WX, WY>
where WX: UnwindSafe, WY: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.