Struct v_frame::plane::PlaneSlice
source · Fields§
§plane: &'a Plane<T>
§x: isize
§y: isize
Implementations§
source§impl<'a, T: Pixel> PlaneSlice<'a, T>
impl<'a, T: Pixel> PlaneSlice<'a, T>
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 + Pixel> Clone for PlaneSlice<'a, T>
impl<'a, T: Clone + Pixel> 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 more