Skip to main content

Renderer

Trait Renderer 

Source
pub trait Renderer {
    type Color: UiColor + Copy;

Show 14 methods // Required methods fn clear(&mut self); fn pixel(&mut self, point: Point, color: Self::Color); fn line(&mut self, start: Point, end: Point, color: Self::Color, width: u32); fn arc(&mut self, arc: Arc, style: PrimitiveStyle<Self::Color>); fn circle(&mut self, circle: Circle, style: PrimitiveStyle<Self::Color>); fn block(&mut self, block: Block<Self::Color>); fn mono_text<'a>( &mut self, text: TextBox<'a, MonoTextStyle<'a, Self::Color>>, ); fn image<'a>(&mut self, image: Image<'a, ImageRaw<'a, Self::Color>>) where RawDataSlice<'a, <Self::Color as PixelColor>::Raw, BigEndian>: IntoIterator<Item = <Self::Color as PixelColor>::Raw>; // Provided methods fn z_index(&self) -> i32 { ... } fn with_z_index(&mut self, z_index: i32, draw: impl Fn(&mut Self)) { ... } fn relative_z_index( &mut self, z_index_offset: i32, draw: impl Fn(&mut Self), ) { ... } fn under(&mut self, draw: impl Fn(&mut Self)) { ... } fn above(&mut self, draw: impl Fn(&mut Self)) { ... } fn topmost(&mut self, draw: impl Fn(&mut Self)) { ... }
}

Required Associated Types§

Required Methods§

Source

fn clear(&mut self)

Source

fn pixel(&mut self, point: Point, color: Self::Color)

Source

fn line(&mut self, start: Point, end: Point, color: Self::Color, width: u32)

Source

fn arc(&mut self, arc: Arc, style: PrimitiveStyle<Self::Color>)

Source

fn circle(&mut self, circle: Circle, style: PrimitiveStyle<Self::Color>)

Source

fn block(&mut self, block: Block<Self::Color>)

Source

fn mono_text<'a>(&mut self, text: TextBox<'a, MonoTextStyle<'a, Self::Color>>)

Source

fn image<'a>(&mut self, image: Image<'a, ImageRaw<'a, Self::Color>>)
where RawDataSlice<'a, <Self::Color as PixelColor>::Raw, BigEndian>: IntoIterator<Item = <Self::Color as PixelColor>::Raw>,

Provided Methods§

Source

fn z_index(&self) -> i32

Source

fn with_z_index(&mut self, z_index: i32, draw: impl Fn(&mut Self))

Source

fn relative_z_index(&mut self, z_index_offset: i32, draw: impl Fn(&mut Self))

Source

fn under(&mut self, draw: impl Fn(&mut Self))

Source

fn above(&mut self, draw: impl Fn(&mut Self))

Source

fn topmost(&mut self, draw: impl Fn(&mut Self))

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Renderer for NullRenderer

Source§

impl<D, C: UiColor> Renderer for D
where D: DrawTarget<Color = C>, D::Error: Debug,

Source§

type Color = C