Fix standalone compilation of iced_test subcrate

This commit is contained in:
Héctor Ramón Jiménez 2025-12-07 21:24:57 +01:00
parent 6ad39fe544
commit b11ad9ff5e
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
5 changed files with 35 additions and 4 deletions

View file

@ -259,3 +259,29 @@ impl svg::Renderer for () {
) {
}
}
impl renderer::Headless for () {
async fn new(
_default_font: Font,
_default_text_size: Pixels,
_backend: Option<&str>,
) -> Option<Self>
where
Self: Sized,
{
Some(())
}
fn name(&self) -> String {
"null renderer".to_owned()
}
fn screenshot(
&mut self,
_size: Size<u32>,
_scale_factor: f32,
_background_color: Color,
) -> Vec<u8> {
Vec::new()
}
}