Trait iup::image::ImageElement
[−]
[src]
pub trait ImageElement: Element {
type Pixel: 'static + Copy;
fn new<U>(width: u32, height: u32, pixels: U) -> Self where U: AsRef<[Self::Pixel]>;
fn with<'a>(pixels: InPixels<'a, Self::Pixel>) -> Self { ... }
}
Associated Types
type Pixel: 'static + Copy
The type of a single pixel of this image.
Required Methods
fn new<U>(width: u32, height: u32, pixels: U) -> Self where U: AsRef<[Self::Pixel]>
Creates a new image element with the specified dimensions from the specified pixel array.
Panics
Should panic if width
xheight
does not match the length of pixels
.
Provided Methods
fn with<'a>(pixels: InPixels<'a, Self::Pixel>) -> Self
Creates a new image element from the output of the pixels!
macro.
Panics
Panics if not all the rows of pixels
have the same length.
Implementors
impl ImageElement for Image
impl ImageElement for ImageRgb
impl ImageElement for ImageRgba