Trait cosmic::iced_style::core::Renderer
source · pub trait Renderer: Sized {
// Required methods
fn with_layer(&mut self, bounds: Rectangle, f: impl FnOnce(&mut Self));
fn with_translation(
&mut self,
translation: Vector,
f: impl FnOnce(&mut Self),
);
fn fill_quad(&mut self, quad: Quad, background: impl Into<Background>);
fn clear(&mut self);
}
Expand description
A component that can be used by widgets to draw themselves on a screen.
Required Methods§
sourcefn 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.
The layer will clip its contents to the provided bounds
.
sourcefn with_translation(&mut self, translation: Vector, f: impl FnOnce(&mut Self))
fn with_translation(&mut self, translation: Vector, f: impl FnOnce(&mut Self))
Applies a translation
to the primitives recorded in the given closure.
sourcefn 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
.
Object Safety§
This trait is not object safe.