Trait droom_ui::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

The type of a single pixel of this image.

Required Methods

Creates a new image element with the specified dimensions from the specified pixel array.

Panics

Should panic if widthxheight does not match the length of pixels.

Provided Methods

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