Type Alias Compositor

Source
pub type Compositor = Compositor<Compositor, Compositor>;
Expand description

The default graphics compositor for iced.

Aliased Type§

enum Compositor {
    Primary(Compositor),
    Secondary(Compositor),
}

Variants§

§

Primary(Compositor)

The primary compositing option.

§

Secondary(Compositor)

The secondary (or fallback) compositing option.

Trait Implementations

Source§

impl<A, B> Compositor for Compositor<A, B>
where A: Compositor, B: Compositor,

Source§

type Renderer = Renderer<<A as Compositor>::Renderer, <B as Compositor>::Renderer>

The iced renderer of the backend.
Source§

type Surface = Surface<<A as Compositor>::Surface, <B as Compositor>::Surface>

The surface of the backend.
Source§

async fn with_backend<W: Window + Clone>( settings: Settings, compatible_window: W, backend: Option<&str>, ) -> Result<Self, Error>

Creates a new [Compositor] with a backend preference. Read more
Source§

fn create_renderer(&self) -> Self::Renderer

Creates a [Self::Renderer] for the [Compositor].
Source§

fn create_surface<W: Window + Clone>( &mut self, window: W, width: u32, height: u32, ) -> Self::Surface

Crates a new Surface for the given window.
Source§

fn configure_surface( &mut self, surface: &mut Self::Surface, width: u32, height: u32, )

Configures a new Surface with the given dimensions.
Source§

fn load_font(&mut self, font: Cow<'static, [u8]>)

Loads a font from its bytes.
Source§

fn fetch_information(&self) -> Information

Returns [Information] used by this [Compositor].
Source§

fn present( &mut self, renderer: &mut Self::Renderer, surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, on_pre_present: impl FnOnce(), ) -> Result<(), SurfaceError>

Presents the Renderer primitives to the next frame of the given Surface.
Source§

fn screenshot( &mut self, renderer: &mut Self::Renderer, viewport: &Viewport, background_color: Color, ) -> Vec<u8>

Screenshots the current Renderer primitives to an offscreen texture, and returns the bytes of the texture ordered as RGBA in the sRGB color space.
§

fn new<W>( settings: Settings, compatible_window: W, ) -> impl Future<Output = Result<Self, Error>>
where W: Window + Clone,

Creates a new [Compositor].
Source§

impl<A, B> Debug for Compositor<A, B>
where A: Compositor + Debug, B: Compositor + Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more