Type Alias embedded_graphics::image::ImageRawBE
source · pub type ImageRawBE<'a, C> = ImageRaw<'a, C, BigEndian>;
Expand description
Image with big endian data.
Aliased Type§
struct ImageRawBE<'a, C> { /* private fields */ }
Implementations
source§impl<'a> ImageRaw<'a, BinaryColor>
impl<'a> ImageRaw<'a, BinaryColor>
sourcepub const fn new_binary(data: &'a [u8], width: u32) -> Self
pub const fn new_binary(data: &'a [u8], width: u32) -> Self
Creates a new binary image.
Due to const fn
limitations the new
method cannot be used in const
contexts. This
method provides a workaround to create ImageRaw
s with BinaryColor
images.
Only the width of the image needs to be specified. The height of the image will be calculated based on the length of the given image data.
§Panics
This function panics if width == 0
.
source§impl<'a, C, BO> ImageRaw<'a, C, BO>
impl<'a, C, BO> ImageRaw<'a, C, BO>
sourcepub fn new(data: &'a [u8], width: u32) -> Self
pub fn new(data: &'a [u8], width: u32) -> Self
Creates a new image.
Only the width of the image needs to be specified. The height of the image will be calculated based on the length of the given image data. If the length of the image data isn’t an integer multiple of the data length for a single row the last partial row will be ignored.
Trait Implementations
source§impl<'a, C, BO> ImageDrawable for ImageRaw<'a, C, BO>where
C: PixelColor + From<<C as PixelColor>::Raw>,
BO: ByteOrder,
RawDataSlice<'a, C::Raw, BO>: IntoIterator<Item = C::Raw>,
impl<'a, C, BO> ImageDrawable for ImageRaw<'a, C, BO>where
C: PixelColor + From<<C as PixelColor>::Raw>,
BO: ByteOrder,
RawDataSlice<'a, C::Raw, BO>: IntoIterator<Item = C::Raw>,
source§impl<'a, C, BO> Ord for ImageRaw<'a, C, BO>
impl<'a, C, BO> Ord for ImageRaw<'a, C, BO>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more