Commit ebfe5dd6 authored by Romain Vimont's avatar Romain Vimont Committed by Romain Vimont

Remove EdgedPlaneSlice

EdgedPlaneSlice is not used anymore. Remove it.
parent b8063c41
......@@ -264,19 +264,6 @@ impl<T: Pixel> Plane<T> {
self.mut_slice(PlaneOffset { x: 0, y: 0 })
}
#[inline]
pub fn edged_slice(&self, po: PlaneOffset, left_edge: usize, top_edge: usize) -> EdgedPlaneSlice<'_, T> {
debug_assert!(po.x >= 0);
debug_assert!(po.y >= 0);
let left_edge = left_edge.min(po.x as usize);
let top_edge = top_edge.min(po.y as usize);
let edged_po = PlaneOffset {
x: po.x - left_edge as isize,
y: po.y - top_edge as isize,
};
EdgedPlaneSlice { ps: self.slice(edged_po), left_edge, top_edge }
}
#[inline]
fn index(&self, x: usize, y: usize) -> usize {
(y + self.cfg.yorigin) * self.cfg.stride + (x + self.cfg.xorigin)
......@@ -653,18 +640,6 @@ impl<'a, T: Pixel> IndexMut<usize> for PlaneMutSlice<'a, T> {
}
}
pub struct EdgedPlaneSlice<'a, T: Pixel> {
pub ps: PlaneSlice<'a, T>,
pub left_edge: usize,
pub top_edge: usize,
}
impl<T: Pixel> EdgedPlaneSlice<'_, T> {
pub fn without_edges(&self) -> PlaneSlice<'_, T> {
self.ps.subslice(self.left_edge, self.top_edge)
}
}
#[cfg(test)]
pub mod test {
use super::*;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment