Struct iced_graphics::renderer::Renderer
source · pub struct Renderer<B: Backend> { /* private fields */ }
Expand description
A backend-agnostic renderer that supports all the built-in widgets.
Implementations§
source§impl<B: Backend> Renderer<B>
impl<B: Backend> Renderer<B>
sourcepub fn draw_primitive(&mut self, primitive: Primitive<B::Primitive>)
pub fn draw_primitive(&mut self, primitive: Primitive<B::Primitive>)
sourcepub fn with_primitives<O>(
&mut self,
f: impl FnOnce(&mut B, &[Primitive<B::Primitive>]) -> O
) -> O
pub fn with_primitives<O>( &mut self, f: impl FnOnce(&mut B, &[Primitive<B::Primitive>]) -> O ) -> O
sourcepub fn start_layer(&mut self) -> Vec<Primitive<B::Primitive>>
pub fn start_layer(&mut self) -> Vec<Primitive<B::Primitive>>
Starts recording a new layer.
sourcepub fn end_layer(
&mut self,
primitives: Vec<Primitive<B::Primitive>>,
bounds: Rectangle
)
pub fn end_layer( &mut self, primitives: Vec<Primitive<B::Primitive>>, bounds: Rectangle )
Ends the recording of a layer.
sourcepub fn start_transformation(&mut self) -> Vec<Primitive<B::Primitive>>
pub fn start_transformation(&mut self) -> Vec<Primitive<B::Primitive>>
Starts recording a translation.
sourcepub fn end_transformation(
&mut self,
primitives: Vec<Primitive<B::Primitive>>,
transformation: Transformation
)
pub fn end_transformation( &mut self, primitives: Vec<Primitive<B::Primitive>>, transformation: Transformation )
Ends the recording of a translation.
Trait Implementations§
source§impl<B: Backend> Renderer for Renderer<B>
impl<B: Backend> Renderer for Renderer<B>
source§fn with_layer(&mut self, bounds: Rectangle, f: impl FnOnce(&mut Self))
fn with_layer(&mut self, bounds: Rectangle, f: impl FnOnce(&mut Self))
Draws the primitives recorded in the given closure in a new layer. Read more
source§fn with_transformation(
&mut self,
transformation: Transformation,
f: impl FnOnce(&mut Self)
)
fn with_transformation( &mut self, transformation: Transformation, f: impl FnOnce(&mut Self) )
Applies a
Transformation
to the primitives recorded in the given closure.source§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
.source§impl<B> Renderer for Renderer<B>
impl<B> Renderer for Renderer<B>
source§impl<B> Renderer for Renderer<B>
impl<B> Renderer for Renderer<B>
source§const CHECKMARK_ICON: char = '\u{f00c}'
const CHECKMARK_ICON: char = '\u{f00c}'
The
char
representing a ✔ icon in the ICON_FONT
.source§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
.source§fn default_font(&self) -> Self::Font
fn default_font(&self) -> Self::Font
Returns the default
Self::Font
.source§fn default_size(&self) -> Pixels
fn default_size(&self) -> Pixels
Returns the default size of
Text
.source§fn fill_paragraph(
&mut self,
paragraph: &Self::Paragraph,
position: Point,
color: Color,
clip_bounds: Rectangle
)
fn fill_paragraph( &mut self, paragraph: &Self::Paragraph, position: Point, color: Color, clip_bounds: Rectangle )
Auto Trait Implementations§
impl<B> !RefUnwindSafe for Renderer<B>
impl<B> Send for Renderer<B>
impl<B> Sync for Renderer<B>
impl<B> Unpin for Renderer<B>
impl<B> !UnwindSafe for Renderer<B>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more