pub struct PlaneSlice<'a, T>where
T: Pixel,{
pub plane: &'a Plane<T>,
pub x: isize,
pub y: isize,
}
Fields§
§plane: &'a Plane<T>
§x: isize
§y: isize
Implementations§
source§impl<'a, T> PlaneSlice<'a, T>where
T: Pixel,
impl<'a, T> PlaneSlice<'a, T>where
T: Pixel,
pub fn as_ptr(&self) -> *const T
pub fn rows_iter(&self) -> RowsIter<'_, T> ⓘ
pub fn clamp(&self) -> PlaneSlice<'a, T>
pub fn subslice(&self, xo: usize, yo: usize) -> PlaneSlice<'a, T>
pub fn reslice(&self, xo: isize, yo: isize) -> PlaneSlice<'a, T>
sourcepub fn go_up(&self, i: usize) -> PlaneSlice<'a, T>
pub fn go_up(&self, i: usize) -> PlaneSlice<'a, T>
A slice starting i pixels above the current one.
sourcepub fn go_left(&self, i: usize) -> PlaneSlice<'a, T>
pub fn go_left(&self, i: usize) -> PlaneSlice<'a, T>
A slice starting i pixels to the left of the current one.
pub fn p(&self, add_x: usize, add_y: usize) -> T
sourcepub fn accessible(&self, add_x: usize, add_y: usize) -> bool
pub fn accessible(&self, add_x: usize, add_y: usize) -> bool
Checks if add_y
and add_x
lies in the allocated bounds of the
underlying plane.
sourcepub fn accessible_neg(&self, sub_x: usize, sub_y: usize) -> bool
pub fn accessible_neg(&self, sub_x: usize, sub_y: usize) -> bool
Checks if -sub_x
and -sub_y
lies in the allocated bounds of the
underlying plane.
sourcepub fn row_cropped(&self, y: usize) -> &[T]
pub fn row_cropped(&self, y: usize) -> &[T]
This version of the function crops off the padding on the right side of the image
Trait Implementations§
source§impl<'a, T> Clone for PlaneSlice<'a, T>
impl<'a, T> Clone for PlaneSlice<'a, T>
source§fn clone(&self) -> PlaneSlice<'a, T>
fn clone(&self) -> PlaneSlice<'a, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, T> Debug for PlaneSlice<'a, T>
impl<'a, T> Debug for PlaneSlice<'a, T>
impl<'a, T> Copy for PlaneSlice<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for PlaneSlice<'a, T>
impl<'a, T> RefUnwindSafe for PlaneSlice<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for PlaneSlice<'a, T>
impl<'a, T> Sync for PlaneSlice<'a, T>
impl<'a, T> Unpin for PlaneSlice<'a, T>
impl<'a, T> UnwindSafe for PlaneSlice<'a, T>where
T: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more