Struct embedded_graphics::draw_target::Clipped[][src]

pub struct Clipped<'a, T> where
    T: DrawTarget
{ /* fields omitted */ }
Expand description

Clipped draw target.

Created by calling clipped on any DrawTarget. See the clipped method documentation for more.

Trait Implementations

impl<'a, T: Debug> Debug for Clipped<'a, T> where
    T: DrawTarget
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T> Dimensions for Clipped<'_, T> where
    T: DrawTarget
[src]

fn bounding_box(&self) -> Rectangle[src]

Returns the bounding box.

impl<T> DrawTarget for Clipped<'_, T> where
    T: DrawTarget
[src]

type Color = T::Color

The pixel color type the targetted display supports.

type Error = T::Error

Error type to return when a drawing operation fails. Read more

fn draw_iter<I>(&mut self, pixels: I) -> Result<(), Self::Error> where
    I: IntoIterator<Item = Pixel<Self::Color>>, 
[src]

Draw individual pixels to the display without a defined order. Read more

fn fill_contiguous<I>(
    &mut self,
    area: &Rectangle,
    colors: I
) -> Result<(), Self::Error> where
    I: IntoIterator<Item = Self::Color>, 
[src]

Fill a given area with an iterator providing a contiguous stream of pixel colors. Read more

fn fill_solid(
    &mut self,
    area: &Rectangle,
    color: Self::Color
) -> Result<(), Self::Error>
[src]

Fill a given area with a solid color. Read more

fn clear(&mut self, color: Self::Color) -> Result<(), Self::Error>[src]

Fill the entire display with a solid color. Read more

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Clipped<'a, T> where
    T: RefUnwindSafe

impl<'a, T> Send for Clipped<'a, T> where
    T: Send

impl<'a, T> Sync for Clipped<'a, T> where
    T: Sync

impl<'a, T> Unpin for Clipped<'a, T>

impl<'a, T> !UnwindSafe for Clipped<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> DrawTargetExt for T where
    T: DrawTarget
[src]

pub fn translated(&mut Self, Point) -> Translated<'_, T>[src]

Creates a translated draw target based on this draw target. Read more

pub fn cropped(&mut Self, &Rectangle) -> Cropped<'_, T>[src]

Creates a cropped draw target based on this draw target. Read more

pub fn clipped(&mut Self, &Rectangle) -> Clipped<'_, T>[src]

Creates a clipped draw target based on this draw target. Read more

pub fn color_converted<C>(&mut Self) -> ColorConverted<'_, T, C> where
    C: PixelColor + Into<<T as DrawTarget>::Color>, 
[src]

Creates a color conversion draw target. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

pub fn lossless_try_into(self) -> Option<Dst>[src]

Performs the conversion.

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

pub fn lossy_into(self) -> Dst[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

pub fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

pub fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).

pub fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

pub fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V