Expand description
§Headless backend
A Painter that draws nothing and records every call, and a HeadlessBackend that has no
window and records what the engine asks of it, so a Widget’s paint and a whole Engine can
be unit tested without a display.
use pushrod::backend::headless::{PaintCall, RecordingPainter};
use pushrod::color::Color;
use pushrod::paint;
let mut p = RecordingPainter::default();
paint::fill(&mut p, Color::WHITE);
assert_eq!(p.calls, vec![PaintCall::Fill(Color::WHITE)]);Structs§
- Headless
Backend - A
Backendwith no window: input is scripted, drawing is recorded, and nothing needs a display. - Recording
Painter - A
Painterthat records its calls incalls.
Enums§
- Paint
Call - One call made on a
RecordingPainter.