Introduce iced_sentinel and iced_debug crates

This commit is contained in:
Héctor Ramón Jiménez 2024-02-26 07:00:51 +01:00
parent 58a7007ac1
commit dd36893f7a
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
26 changed files with 543 additions and 567 deletions

View file

@ -55,26 +55,24 @@ pub trait Compositor: Sized {
///
/// [`Renderer`]: Self::Renderer
/// [`Surface`]: Self::Surface
fn present<T: AsRef<str>>(
fn present(
&mut self,
renderer: &mut Self::Renderer,
surface: &mut Self::Surface,
viewport: &Viewport,
background_color: Color,
overlay: &[T],
) -> Result<(), SurfaceError>;
/// Screenshots the current [`Renderer`] primitives to an offscreen texture, and returns the bytes of
/// the texture ordered as `RGBA` in the `sRGB` color space.
///
/// [`Renderer`]: Self::Renderer
fn screenshot<T: AsRef<str>>(
fn screenshot(
&mut self,
renderer: &mut Self::Renderer,
surface: &mut Self::Surface,
viewport: &Viewport,
background_color: Color,
overlay: &[T],
) -> Vec<u8>;
}