pub struct Image {
pub path: String,
/* private fields */
}Fields§
§path: StringImplementations§
Source§impl Image
impl Image
pub fn render_at_position(&mut self, x: u16, y: u16, width: u16, height: u16)
pub fn render_pixels_at_position( x: u16, y: u16, width: u16, height: u16, pixels: &[[u8; 4]], pixel_width: usize, )
Sourcepub fn render_pixels(
width: u16,
height: u16,
pixels: &[[u8; 4]],
pixel_width: usize,
)
pub fn render_pixels( width: u16, height: u16, pixels: &[[u8; 4]], pixel_width: usize, )
Examples found in repository?
examples/pixels.rs (lines 4-14)
3fn main() {
4 Image::render_pixels(
5 20,
6 20,
7 &[
8 [255, 0, 0, 255],
9 [0, 255, 0, 255],
10 [0, 0, 255, 255],
11 [0, 0, 255, 255],
12 ],
13 2,
14 );
15}Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more