Trait aurum_image::Image
[−]
[src]
pub trait Image { type Bounds: Bounds; type Pixel; fn bounds(&self) -> &Self::Bounds; fn pixel(&self, index: <Self::Bounds as Bounds>::Index) -> Self::Pixel; fn bounded<B, I>(self, bounds: B) -> Bounded<Self, B>
where
Self: Sized,
Self::Bounds: Bounds<Index = I> + IsUnbounded,
B: Bounds<Index = I>,
I: Copy, { ... } fn in_bounds(&self, index: <Self::Bounds as Bounds>::Index) -> bool { ... } fn map<F, Q>(self, f: F) -> Map<Self, F>
where
Self: Sized,
F: Fn(Self::Pixel) -> Q, { ... } fn render<T>(&self) -> T
where
Self: Sized,
T: FromImage<Self>, { ... } fn transform<F, I>(self, f: F) -> Transform<Self, F, I>
where
Self: Sized,
F: Fn(I) -> <Self::Bounds as Bounds>::Index,
I: Copy, { ... } fn try_pixel(
&self,
index: <Self::Bounds as Bounds>::Index
) -> Option<Self::Pixel> { ... } unsafe fn unsafe_pixel(
&self,
index: <Self::Bounds as Bounds>::Index
) -> Self::Pixel { ... } fn with_size1<T>(self, len: T) -> Bounded<Self, Size1<T>>
where
Self: Sized,
Self::Bounds: Bounds<Index = T> + IsUnbounded,
T: Copy, { ... } fn with_size2<T>(self, size: Vec2<T>) -> Bounded<Self, Size2<T>>
where
Self: Sized,
Self::Bounds: Bounds<Index = Vec2<T>> + IsUnbounded,
T: Copy, { ... } fn with_size2_parts<T>(self, width: T, height: T) -> Bounded<Self, Size2<T>>
where
Self: Sized,
Self::Bounds: Bounds<Index = Vec2<T>> + IsUnbounded,
T: Copy, { ... } fn with_size3<T>(self, size: Vec3<T>) -> Bounded<Self, Size3<T>>
where
Self: Sized,
Self::Bounds: Bounds<Index = Vec3<T>> + IsUnbounded,
T: Copy, { ... } fn with_size3_parts<T>(
self,
width: T,
height: T,
depth: T
) -> Bounded<Self, Size3<T>>
where
Self: Sized,
Self::Bounds: Bounds<Index = Vec3<T>> + IsUnbounded,
T: Copy, { ... } }
Raster image trait.
Associated Types
Required Methods
fn bounds(&self) -> &Self::Bounds
fn pixel(&self, index: <Self::Bounds as Bounds>::Index) -> Self::Pixel
Provided Methods
fn bounded<B, I>(self, bounds: B) -> Bounded<Self, B> where
Self: Sized,
Self::Bounds: Bounds<Index = I> + IsUnbounded,
B: Bounds<Index = I>,
I: Copy,
Self: Sized,
Self::Bounds: Bounds<Index = I> + IsUnbounded,
B: Bounds<Index = I>,
I: Copy,
fn in_bounds(&self, index: <Self::Bounds as Bounds>::Index) -> bool
fn map<F, Q>(self, f: F) -> Map<Self, F> where
Self: Sized,
F: Fn(Self::Pixel) -> Q,
Self: Sized,
F: Fn(Self::Pixel) -> Q,
fn render<T>(&self) -> T where
Self: Sized,
T: FromImage<Self>,
Self: Sized,
T: FromImage<Self>,
fn transform<F, I>(self, f: F) -> Transform<Self, F, I> where
Self: Sized,
F: Fn(I) -> <Self::Bounds as Bounds>::Index,
I: Copy,
Self: Sized,
F: Fn(I) -> <Self::Bounds as Bounds>::Index,
I: Copy,
fn try_pixel(
&self,
index: <Self::Bounds as Bounds>::Index
) -> Option<Self::Pixel>
&self,
index: <Self::Bounds as Bounds>::Index
) -> Option<Self::Pixel>
unsafe fn unsafe_pixel(
&self,
index: <Self::Bounds as Bounds>::Index
) -> Self::Pixel
&self,
index: <Self::Bounds as Bounds>::Index
) -> Self::Pixel
fn with_size1<T>(self, len: T) -> Bounded<Self, Size1<T>> where
Self: Sized,
Self::Bounds: Bounds<Index = T> + IsUnbounded,
T: Copy,
Self: Sized,
Self::Bounds: Bounds<Index = T> + IsUnbounded,
T: Copy,
fn with_size2<T>(self, size: Vec2<T>) -> Bounded<Self, Size2<T>> where
Self: Sized,
Self::Bounds: Bounds<Index = Vec2<T>> + IsUnbounded,
T: Copy,
Self: Sized,
Self::Bounds: Bounds<Index = Vec2<T>> + IsUnbounded,
T: Copy,
fn with_size2_parts<T>(self, width: T, height: T) -> Bounded<Self, Size2<T>> where
Self: Sized,
Self::Bounds: Bounds<Index = Vec2<T>> + IsUnbounded,
T: Copy,
Self: Sized,
Self::Bounds: Bounds<Index = Vec2<T>> + IsUnbounded,
T: Copy,
fn with_size3<T>(self, size: Vec3<T>) -> Bounded<Self, Size3<T>> where
Self: Sized,
Self::Bounds: Bounds<Index = Vec3<T>> + IsUnbounded,
T: Copy,
Self: Sized,
Self::Bounds: Bounds<Index = Vec3<T>> + IsUnbounded,
T: Copy,
fn with_size3_parts<T>(
self,
width: T,
height: T,
depth: T
) -> Bounded<Self, Size3<T>> where
Self: Sized,
Self::Bounds: Bounds<Index = Vec3<T>> + IsUnbounded,
T: Copy,
self,
width: T,
height: T,
depth: T
) -> Bounded<Self, Size3<T>> where
Self: Sized,
Self::Bounds: Bounds<Index = Vec3<T>> + IsUnbounded,
T: Copy,
Implementors
impl<T, B, I> Image for Bounded<T, B> where
T: Image,
T::Bounds: Bounds<Index = I> + IsUnbounded,
B: Bounds<Index = I>,
I: Copy,impl<I, T> Image for Fill<I, T> where
I: Copy,
T: Copy,impl<T, F, P, Q> Image for Map<T, F> where
T: Image<Pixel = P>,
F: Fn(P) -> Q,impl<T, F, I> Image for Transform<T, F, I> where
T: Image,
F: Fn(I) -> <T::Bounds as Bounds>::Index,
I: Copy,impl<T: Copy> Image for VecImage2<T>
impl<'a, T> Image for &'a VecImage2<T>