[−][src]Struct pixel_canvas::image::Image
An image for editing.
It dereferences to a slice of Color, so you can directly manipulate
pixels via regular (mutable) slice methods. In addition, you can index
into the image by (row, column) pairs.
Methods
impl Image[src]
pub fn width(&self) -> usize[src]
The width of the image in pixels.
pub fn height(&self) -> usize[src]
The height of the image in pixels.
pub fn new(width: usize, height: usize) -> Image[src]
Create an all-black image with the given dimensions.
pub fn fill(&mut self, color: Color)[src]
Fill the image with a single solid color.
Trait Implementations
impl Deref for Image[src]
impl DerefMut for Image[src]
impl Index<RC> for Image[src]
impl Index<XY> for Image[src]
impl IndexMut<RC> for Image[src]
impl IndexMut<XY> for Image[src]
impl<'a> Texture2dDataSource<'a> for &'a Image[src]
Auto Trait Implementations
impl Send for Image
impl Unpin for Image
impl Sync for Image
impl UnwindSafe for Image
impl RefUnwindSafe for Image
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,