[][src]Struct embedded_graphics::style::Styled

pub struct Styled<T, S> {
    pub primitive: T,
    pub style: S,
}

Styled.

Fields

primitive: T

Primitive.

style: S

Style.

Methods

impl<T, S> Styled<T, S>[src]

pub fn new(primitive: T, style: S) -> Self[src]

Creates a styled.

Trait Implementations

impl<T: Clone, S: Clone> Clone for Styled<T, S>[src]

impl<T: Copy, S: Copy> Copy for Styled<T, S>[src]

impl<T: Debug, S: Debug> Debug for Styled<T, S>[src]

impl<T: Default, S: Default> Default for Styled<T, S>[src]

impl<'_, C, F> Dimensions for Styled<Text<'_>, TextStyle<C, F>> where
    C: PixelColor,
    F: Font
[src]

fn size(&self) -> Size[src]

Returns the size of the bounding box of a styled text.

Currently does not handle newlines (but neither does the rasteriser). It will return Size::zero() if the string to render is empty.

impl<T, S> Dimensions for Styled<T, S> where
    T: Dimensions
[src]

impl<'_, '_, C, F> Drawable<C> for &'_ Styled<Text<'_>, TextStyle<C, F>> where
    C: PixelColor,
    F: Font + Copy
[src]

impl<'a, '_, C: 'a> Drawable<C> for &'_ Styled<Circle, PrimitiveStyle<C>> where
    C: PixelColor
[src]

impl<'a, '_, C: 'a> Drawable<C> for &'_ Styled<Line, PrimitiveStyle<C>> where
    C: PixelColor
[src]

impl<'_, C> Drawable<C> for &'_ Styled<Rectangle, PrimitiveStyle<C>> where
    C: PixelColor
[src]

impl<'a, '_, C: 'a> Drawable<C> for &'_ Styled<Triangle, PrimitiveStyle<C>> where
    C: PixelColor
[src]

impl<T: Eq, S: Eq> Eq for Styled<T, S>[src]

impl<T: Hash, S: Hash> Hash for Styled<T, S>[src]

impl<'a, '_, C, F> IntoIterator for &'_ Styled<Text<'a>, TextStyle<C, F>> where
    C: PixelColor,
    F: Font + Copy
[src]

type Item = Pixel<C>

The type of the elements being iterated over.

type IntoIter = StyledTextIterator<'a, C, F>

Which kind of iterator are we turning this into?

impl<'a, C> IntoIterator for &'a Styled<Circle, PrimitiveStyle<C>> where
    C: PixelColor
[src]

type Item = Pixel<C>

The type of the elements being iterated over.

type IntoIter = StyledCircleIterator<C>

Which kind of iterator are we turning this into?

impl<'a, C> IntoIterator for &'a Styled<Line, PrimitiveStyle<C>> where
    C: PixelColor
[src]

type Item = Pixel<C>

The type of the elements being iterated over.

type IntoIter = StyledLineIterator<C>

Which kind of iterator are we turning this into?

impl<'_, C> IntoIterator for &'_ Styled<Rectangle, PrimitiveStyle<C>> where
    C: PixelColor
[src]

type Item = Pixel<C>

The type of the elements being iterated over.

type IntoIter = StyledRectangleIterator<C>

Which kind of iterator are we turning this into?

impl<'_, C> IntoIterator for &'_ Styled<Triangle, PrimitiveStyle<C>> where
    C: PixelColor
[src]

type Item = Pixel<C>

The type of the elements being iterated over.

type IntoIter = StyledTriangleIterator<C>

Which kind of iterator are we turning this into?

impl<T: Ord, S: Ord> Ord for Styled<T, S>[src]

impl<T: PartialEq, S: PartialEq> PartialEq<Styled<T, S>> for Styled<T, S>[src]

impl<T: PartialOrd, S: PartialOrd> PartialOrd<Styled<T, S>> for Styled<T, S>[src]

impl<T, S> StructuralEq for Styled<T, S>[src]

impl<T, S> StructuralPartialEq for Styled<T, S>[src]

impl<T, S> Transform for Styled<T, S> where
    T: Transform,
    S: Clone
[src]

Auto Trait Implementations

impl<T, S> Send for Styled<T, S> where
    S: Send,
    T: Send

impl<T, S> Sync for Styled<T, S> where
    S: Sync,
    T: Sync

impl<T, S> Unpin for Styled<T, S> where
    S: Unpin,
    T: Unpin

Blanket Implementations

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

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

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

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

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.

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.

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