[−][src]Struct rin::graphics::image::SubImage
A View into another image
Methods
impl<I> SubImage<I>
[src]
impl<I> SubImage<I>
pub fn new(image: I, x: u32, y: u32, width: u32, height: u32) -> SubImage<I>
[src]
pub fn new(image: I, x: u32, y: u32, width: u32, height: u32) -> SubImage<I>
Construct a new subimage
pub fn change_bounds(&mut self, x: u32, y: u32, width: u32, height: u32)
[src]
pub fn change_bounds(&mut self, x: u32, y: u32, width: u32, height: u32)
Change the coordinates of this subimage.
pub fn to_image(
&self
) -> ImageBuffer<<<I as Deref>::Target as GenericImageView>::Pixel, Vec<<<<I as Deref>::Target as GenericImageView>::Pixel as Pixel>::Subpixel>> where
I: Deref,
<I as Deref>::Target: GenericImage,
<I as Deref>::Target: 'static,
[src]
pub fn to_image(
&self
) -> ImageBuffer<<<I as Deref>::Target as GenericImageView>::Pixel, Vec<<<<I as Deref>::Target as GenericImageView>::Pixel as Pixel>::Subpixel>> where
I: Deref,
<I as Deref>::Target: GenericImage,
<I as Deref>::Target: 'static,
Convert this subimage to an ImageBuffer
Trait Implementations
impl<I> GenericImageView for SubImage<I> where
I: Deref,
<I as Deref>::Target: GenericImageView,
<I as Deref>::Target: Sized,
[src]
impl<I> GenericImageView for SubImage<I> where
I: Deref,
<I as Deref>::Target: GenericImageView,
<I as Deref>::Target: Sized,
type Pixel = <<I as Deref>::Target as GenericImageView>::Pixel
The type of pixel.
type InnerImageView = <I as Deref>::Target
Underlying image type. This is mainly used by SubImages in order to always have a reference to the original image. This allows for less indirections and it eases the use of nested SubImages. Read more
fn dimensions(&self) -> (u32, u32)
[src]
fn dimensions(&self) -> (u32, u32)
fn bounds(&self) -> (u32, u32, u32, u32)
[src]
fn bounds(&self) -> (u32, u32, u32, u32)
fn get_pixel(&self, x: u32, y: u32) -> <SubImage<I> as GenericImageView>::Pixel
[src]
fn get_pixel(&self, x: u32, y: u32) -> <SubImage<I> as GenericImageView>::Pixel
fn view(
&self,
x: u32,
y: u32,
width: u32,
height: u32
) -> SubImage<&<SubImage<I> as GenericImageView>::InnerImageView>
[src]
fn view(
&self,
x: u32,
y: u32,
width: u32,
height: u32
) -> SubImage<&<SubImage<I> as GenericImageView>::InnerImageView>
fn inner(&self) -> &<SubImage<I> as GenericImageView>::InnerImageView
[src]
fn inner(&self) -> &<SubImage<I> as GenericImageView>::InnerImageView
fn width(&self) -> u32
[src]
fn width(&self) -> u32
The width of this image.
fn height(&self) -> u32
[src]
fn height(&self) -> u32
The height of this image.
fn in_bounds(&self, x: u32, y: u32) -> bool
[src]
fn in_bounds(&self, x: u32, y: u32) -> bool
Returns true if this x, y coordinate is contained inside the image.
unsafe fn unsafe_get_pixel(&self, x: u32, y: u32) -> Self::Pixel
[src]
unsafe fn unsafe_get_pixel(&self, x: u32, y: u32) -> Self::Pixel
Returns the pixel located at (x, y) Read more
ⓘImportant traits for Pixels<'a, I>fn pixels(&self) -> Pixels<Self>
[src]
fn pixels(&self) -> Pixels<Self>
Returns an Iterator over the pixels of this image. The iterator yields the coordinates of each pixel along with their value Read more
impl<I> GenericImage for SubImage<I> where
I: DerefMut,
<I as Deref>::Target: GenericImage,
<I as Deref>::Target: Sized,
[src]
impl<I> GenericImage for SubImage<I> where
I: DerefMut,
<I as Deref>::Target: GenericImage,
<I as Deref>::Target: Sized,
type InnerImage = <I as Deref>::Target
Underlying image type. This is mainly used by SubImages in order to always have a reference to the original image. This allows for less indirections and it eases the use of nested SubImages. Read more
fn get_pixel_mut(
&mut self,
x: u32,
y: u32
) -> &mut <SubImage<I> as GenericImageView>::Pixel
[src]
fn get_pixel_mut(
&mut self,
x: u32,
y: u32
) -> &mut <SubImage<I> as GenericImageView>::Pixel
fn put_pixel(
&mut self,
x: u32,
y: u32,
pixel: <SubImage<I> as GenericImageView>::Pixel
)
[src]
fn put_pixel(
&mut self,
x: u32,
y: u32,
pixel: <SubImage<I> as GenericImageView>::Pixel
)
fn blend_pixel(
&mut self,
x: u32,
y: u32,
pixel: <SubImage<I> as GenericImageView>::Pixel
)
[src]
fn blend_pixel(
&mut self,
x: u32,
y: u32,
pixel: <SubImage<I> as GenericImageView>::Pixel
)
DEPRECATED: This method will be removed. Blend the pixel directly instead.
fn sub_image(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32
) -> SubImage<&mut <SubImage<I> as GenericImage>::InnerImage>
[src]
fn sub_image(
&mut self,
x: u32,
y: u32,
width: u32,
height: u32
) -> SubImage<&mut <SubImage<I> as GenericImage>::InnerImage>
fn inner_mut(&mut self) -> &mut <SubImage<I> as GenericImage>::InnerImage
[src]
fn inner_mut(&mut self) -> &mut <SubImage<I> as GenericImage>::InnerImage
unsafe fn unsafe_put_pixel(&mut self, x: u32, y: u32, pixel: Self::Pixel)
[src]
unsafe fn unsafe_put_pixel(&mut self, x: u32, y: u32, pixel: Self::Pixel)
Puts a pixel at location (x, y) Read more
ⓘImportant traits for MutPixels<'a, I>fn pixels_mut(&mut self) -> MutPixels<Self>
[src]
fn pixels_mut(&mut self) -> MutPixels<Self>
: This cannot be implemented safely in Rust. Please use the image buffer directly.
Returns an Iterator over mutable pixels of this image. The iterator yields the coordinates of each pixel along with a mutable reference to them. Read more
fn copy_from<O>(&mut self, other: &O, x: u32, y: u32) -> bool where
O: GenericImageView<Pixel = Self::Pixel>,
[src]
fn copy_from<O>(&mut self, other: &O, x: u32, y: u32) -> bool where
O: GenericImageView<Pixel = Self::Pixel>,
Copies all of the pixels from another image into this image. Read more
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: Any,
[src]
impl<T> Any for T where
T: Any,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
impl<T> SetParameter for T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<V> IntoVec for V
[src]
impl<V> IntoVec for V
impl<V> IntoPnt for V
[src]
impl<V> IntoPnt for V
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
[src]
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
[src]
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
[src]
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
[src]
fn from_subset(element: &SS) -> SP
impl<T> Same for T
[src]
impl<T> Same for T
type Output = T
Should always be Self