Struct embedded_graphics_core::Pixel [−][src]
pub struct Pixel<C>(pub Point, pub C)
where
C: PixelColor;
A single pixel.
Pixel
objects are used to specify the position and color of drawn pixels.
Examples
The Drawable
trait is implemented for Pixel
which allows single pixels
to be drawn to a DrawTarget
:
use embedded_graphics::{pixelcolor::BinaryColor, prelude::*}; Pixel(Point::new(1, 2), BinaryColor::On).draw(&mut display)?;
Iterators with Pixel
items can also be drawn:
use embedded_graphics::{pixelcolor::BinaryColor, prelude::*}; (0..32) .map(|i| Pixel(Point::new(i, i * 2), BinaryColor::On)) .draw(&mut display)?;
Trait Implementations
impl<C: Clone> Clone for Pixel<C> where
C: PixelColor,
[src]
impl<C: Clone> Clone for Pixel<C> where
C: PixelColor,
[src]fn clone(&self) -> Pixel<C>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Copy> Copy for Pixel<C> where
C: PixelColor,
[src]
impl<C: Copy> Copy for Pixel<C> where
C: PixelColor,
[src]impl<C: Debug> Debug for Pixel<C> where
C: PixelColor,
[src]
impl<C: Debug> Debug for Pixel<C> where
C: PixelColor,
[src]impl<C> Drawable for Pixel<C> where
C: PixelColor,
[src]
impl<C> Drawable for Pixel<C> where
C: PixelColor,
[src]impl<C: Eq> Eq for Pixel<C> where
C: PixelColor,
[src]
impl<C: Eq> Eq for Pixel<C> where
C: PixelColor,
[src]impl<C: Hash> Hash for Pixel<C> where
C: PixelColor,
[src]
impl<C: Hash> Hash for Pixel<C> where
C: PixelColor,
[src]impl<C: Ord> Ord for Pixel<C> where
C: PixelColor,
[src]
impl<C: Ord> Ord for Pixel<C> where
C: PixelColor,
[src]impl<C: PartialOrd> PartialOrd<Pixel<C>> for Pixel<C> where
C: PixelColor,
[src]
impl<C: PartialOrd> PartialOrd<Pixel<C>> for Pixel<C> where
C: PixelColor,
[src]impl<C> StructuralEq for Pixel<C> where
C: PixelColor,
[src]
impl<C> StructuralEq for Pixel<C> where
C: PixelColor,
[src]impl<C> StructuralPartialEq for Pixel<C> where
C: PixelColor,
[src]
impl<C> StructuralPartialEq for Pixel<C> where
C: PixelColor,
[src]Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Debug + Any,
[src]
impl<T> Scalar for T where
T: Copy + PartialEq<T> + Debug + Any,
[src]pub fn inlined_clone(&self) -> T
[src]
pub fn is<T>() -> bool where
T: Scalar,
[src]
T: Scalar,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,