Struct visioncortex::ColorImage [−][src]
Image with 4 bytes per pixel
Fields
pixels: Vec<u8>
width: usize
height: usize
Implementations
impl ColorImage
[src]
pub fn new() -> Self
[src]
pub fn new_w_h(width: usize, height: usize) -> Self
[src]
pub fn iter(&self) -> ColorImageIter<'_>ⓘNotable traits for ColorImageIter<'_>
impl Iterator for ColorImageIter<'_> type Item = Color;
[src]
Notable traits for ColorImageIter<'_>
impl Iterator for ColorImageIter<'_> type Item = Color;
pub fn get_pixel(&self, x: usize, y: usize) -> Color
[src]
pub fn get_pixel_at_point_safe(&self, p: PointI32) -> Option<Color>
[src]
pub fn get_pixel_safe(&self, x: i32, y: i32) -> Option<Color>
[src]
pub fn get_pixel_at(&self, index: usize) -> Color
[src]
pub fn set_pixel(&mut self, x: usize, y: usize, color: &Color)
[src]
pub fn set_pixel_at(&mut self, index: usize, color: &Color)
[src]
pub fn to_binary_image<F>(&self, f: F) -> BinaryImage where
F: Fn(Color) -> bool,
[src]
F: Fn(Color) -> bool,
pub fn sample_pixel_at(&self, p: PointF32) -> Color
[src]
pub fn sample_pixel_at_safe(&self, p: PointF32) -> Option<Color>
[src]
Trait Implementations
impl Clone for ColorImage
[src]
fn clone(&self) -> ColorImage
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for ColorImage
[src]
fn default() -> ColorImage
[src]
Auto Trait Implementations
impl RefUnwindSafe for ColorImage
impl Send for ColorImage
impl Sync for ColorImage
impl Unpin for ColorImage
impl UnwindSafe for ColorImage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,