pub struct RecordingRenderer {
pub ops: Vec<DrawOp>,
}Expand description
A renderer that records what it was asked to draw, for tests and for inspecting what a frame would contain.
Fields§
§ops: Vec<DrawOp>Trait Implementations§
Source§impl Clone for RecordingRenderer
impl Clone for RecordingRenderer
Source§fn clone(&self) -> RecordingRenderer
fn clone(&self) -> RecordingRenderer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecordingRenderer
impl Debug for RecordingRenderer
Source§impl Default for RecordingRenderer
impl Default for RecordingRenderer
Source§fn default() -> RecordingRenderer
fn default() -> RecordingRenderer
Returns the “default value” for a type. Read more
Source§impl Renderer for RecordingRenderer
impl Renderer for RecordingRenderer
fn fill_rect(&mut self, rect: Rect, radius: Corners<f32>, color: Color)
Source§fn border(
&mut self,
rect: Rect,
widths: Sides<f32>,
colors: Sides<Color>,
radius: Corners<f32>,
)
fn border( &mut self, rect: Rect, widths: Sides<f32>, colors: Sides<Color>, radius: Corners<f32>, )
A border drawn inside
rect, one width and colour per side.Source§fn text(&mut self, text: &str, font: &FontSpec, top_left: Point, color: Color)
fn text(&mut self, text: &str, font: &FontSpec, top_left: Point, color: Color)
A single line of text, its line box starting at
top_left. The
backend places the baseline inside the line box the same way
Fonts::measure measured it.fn pop_clip(&mut self)
Source§fn push_opacity(&mut self, opacity: f32)
fn push_opacity(&mut self, opacity: f32)
Draws everything until the matching
pop_opacity
through a layer with the given opacity.fn pop_opacity(&mut self)
Auto Trait Implementations§
impl Freeze for RecordingRenderer
impl RefUnwindSafe for RecordingRenderer
impl Send for RecordingRenderer
impl Sync for RecordingRenderer
impl Unpin for RecordingRenderer
impl UnsafeUnpin for RecordingRenderer
impl UnwindSafe for RecordingRenderer
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