pub type Renderer<Theme = Theme> = Renderer<Theme>;
Expand description
The default renderer.
Aliased Type§
enum Renderer<Theme = Theme> {
TinySkia(Renderer<Backend, Theme>),
Wgpu(Renderer<Backend, Theme>),
}
Variants§
TinySkia(Renderer<Backend, Theme>)
Wgpu(Renderer<Backend, Theme>)
Available on crate feature
wgpu
only.Trait Implementations§
§impl<T> Renderer for Renderer<T>
impl<T> Renderer for Renderer<T>
§const CHECKMARK_ICON: char = '\u{f00c}'
const CHECKMARK_ICON: char = '\u{f00c}'
The
char
representing a ✔ icon in the ICON_FONT
.§const ARROW_DOWN_ICON: char = '\u{e800}'
const ARROW_DOWN_ICON: char = '\u{e800}'
The
char
representing a ▼ icon in the built-in ICON_FONT
.§fn default_font(&self) -> <Renderer<T> as Renderer>::Font
fn default_font(&self) -> <Renderer<T> as Renderer>::Font
Returns the default
Self::Font
.§fn default_size(&self) -> Pixels
fn default_size(&self) -> Pixels
Returns the default size of
Text
.§fn create_paragraph(
&self,
text: Text<'_, <Renderer<T> as Renderer>::Font>
) -> <Renderer<T> as Renderer>::Paragraph
fn create_paragraph( &self, text: Text<'_, <Renderer<T> as Renderer>::Font> ) -> <Renderer<T> as Renderer>::Paragraph
§fn resize_paragraph(
&self,
paragraph: &mut <Renderer<T> as Renderer>::Paragraph,
new_bounds: Size<f32>
)
fn resize_paragraph( &self, paragraph: &mut <Renderer<T> as Renderer>::Paragraph, new_bounds: Size<f32> )
Lays out the given
Paragraph
with some new boundaries.§fn load_font(&mut self, bytes: Cow<'static, [u8]>)
fn load_font(&mut self, bytes: Cow<'static, [u8]>)
Loads a
Self::Font
from its bytes.§fn fill_paragraph(
&mut self,
text: &<Renderer<T> as Renderer>::Paragraph,
position: Point,
color: Color
)
fn fill_paragraph( &mut self, text: &<Renderer<T> as Renderer>::Paragraph, position: Point, color: Color )
§impl<T> Renderer for Renderer<T>
Available on crate feature image
only.
impl<T> Renderer for Renderer<T>
Available on crate feature
image
only.§impl<T> Renderer for Renderer<T>
impl<T> Renderer for Renderer<T>
§fn with_layer(
&mut self,
bounds: Rectangle<f32>,
f: impl FnOnce(&mut Renderer<T>)
)
fn with_layer( &mut self, bounds: Rectangle<f32>, f: impl FnOnce(&mut Renderer<T>) )
Draws the primitives recorded in the given closure in a new layer. Read more
§fn with_translation(
&mut self,
translation: Vector<f32>,
f: impl FnOnce(&mut Renderer<T>)
)
fn with_translation( &mut self, translation: Vector<f32>, f: impl FnOnce(&mut Renderer<T>) )
Applies a
translation
to the primitives recorded in the given closure.§fn fill_quad(&mut self, quad: Quad, background: impl Into<Background>)
fn fill_quad(&mut self, quad: Quad, background: impl Into<Background>)
Fills a
Quad
with the provided Background
.