[−][src]Struct minilibx::MlxImage
Image data placeholder. Can be used to draw image onto the screen.
Fields
width: i32
width of the image
height: i32
height of the image
bits_per_pixel: i32
number of bits needed to represent a pixel color (depth of the image)
size_line: i32
number of bytes used to store one line of the image in memory.
needed to move from one line to another in the image.
endian: Endian
the endianness of the image
Methods
impl MlxImage
[src]
pub fn write_to(&self, offset: i32, value: u8)
[src]
Writes to the image from offset of the beginning of the area where the image is stored.
The first bits_per_pixel bits represent the color of the first pixel in the first line of the image.
The second bits_per_pixel bits represent the second pixel of the first line, and so on.
This function could cause a segmentation fault if your offset is wrong, be careful !
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MlxImage
impl !Send for MlxImage
impl !Sync for MlxImage
impl Unpin for MlxImage
impl UnwindSafe for MlxImage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,