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§
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))
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.