Struct img::Gray
[−]
[src]
pub struct Gray<BaseTypeP> where
BaseTypeP: Scalar, { /* fields omitted */ }
TODO: Struct documentation
Trait Implementations
impl<BaseTypeP: Copy> Copy for Gray<BaseTypeP> where
BaseTypeP: Scalar,
[src]
BaseTypeP: Scalar,
impl<BaseTypeP: Clone> Clone for Gray<BaseTypeP> where
BaseTypeP: Scalar,
[src]
BaseTypeP: Scalar,
fn clone(&self) -> Gray<BaseTypeP>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<BaseTypeP: Debug> Debug for Gray<BaseTypeP> where
BaseTypeP: Scalar,
[src]
BaseTypeP: Scalar,
impl<BaseTypeP: PartialEq> PartialEq for Gray<BaseTypeP> where
BaseTypeP: Scalar,
[src]
BaseTypeP: Scalar,
fn eq(&self, __arg_0: &Gray<BaseTypeP>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Gray<BaseTypeP>) -> bool
This method tests for !=
.
impl<BaseTypeP> Pixel for Gray<BaseTypeP> where
BaseTypeP: Scalar,
[src]
BaseTypeP: Scalar,
TODO: Impl documentation
fn calc_minimum_pitch(width: u32, _height: u32) -> usize
For a given image size, this function calculates the minimum pitch in bytes. Read more
fn calc_size_in_bytes(width: u32, height: u32, pitch: u32) -> Option<usize>
For a given image size, this function calculates the image size in bytes. Read more
fn load_from_raw_buffer(x: u32, y: u32, pitch: u32, buffer: &[u8]) -> Self
Loads a Pixel
out of a raw buffer. Read more
fn write_into_raw_buffer(&self, x: u32, y: u32, pitch: u32, buffer: &mut [u8])
Writes a Pixel
into a raw buffer. Read more
impl<BaseTypeP> PixelArithmetic for Gray<BaseTypeP> where
BaseTypeP: Scalar,
[src]
BaseTypeP: Scalar,
TODO: Impl documentation
type ScalarT = BaseTypeP
fn add_px_px(self, rhs: Self) -> Self
Add two pixels.
fn sub_px_px(self, rhs: Self) -> Self
Subtract two pixels.
fn mul_px_px(self, rhs: Self) -> Self
Multiply two pixels.
fn div_px_px(self, rhs: Self) -> Self
Divide two pixels.
fn add_px_sc(self, rhs: Self::ScalarT) -> Self
Add a pixel and a scalar
fn sub_px_sc(self, rhs: Self::ScalarT) -> Self
Subtract a pixel and a scalar
fn mul_px_sc(self, rhs: Self::ScalarT) -> Self
Multiply a pixel and a scalar
fn div_px_sc(self, rhs: Self::ScalarT) -> Self
Divide a pixel and a scalar
fn add_sc_px(self, lhs: Self::ScalarT) -> Self
Add a scalar and a pixel
fn sub_sc_px(self, lhs: Self::ScalarT) -> Self
Subtract a scalar and a pixel
fn mul_sc_px(self, lhs: Self::ScalarT) -> Self
Multiply a scalar and a pixel
fn div_sc_px(self, lhs: Self::ScalarT) -> Self
Divide a scalar and a pixel