[−][src]Trait iced_graphics::window::Compositor
A graphics compositor that can draw to windows.
Associated Types
type Settings: Default
The settings of the backend.
type Renderer: Renderer
The iced renderer of the backend.
type Surface
The surface of the backend.
type SwapChain
The swap chain of the backend.
Required methods
fn new(settings: Self::Settings) -> (Self, Self::Renderer)
Creates a new Backend
.
fn create_surface<W: HasRawWindowHandle>(&mut self, window: &W) -> Self::Surface
Crates a new Surface
for the given window.
fn create_swap_chain(
&mut self,
surface: &Self::Surface,
width: u32,
height: u32
) -> Self::SwapChain
&mut self,
surface: &Self::Surface,
width: u32,
height: u32
) -> Self::SwapChain
fn draw<T: AsRef<str>>(
&mut self,
renderer: &mut Self::Renderer,
swap_chain: &mut Self::SwapChain,
viewport: &Viewport,
background_color: Color,
output: &<Self::Renderer as Renderer>::Output,
overlay: &[T]
) -> Interaction
&mut self,
renderer: &mut Self::Renderer,
swap_chain: &mut Self::SwapChain,
viewport: &Viewport,
background_color: Color,
output: &<Self::Renderer as Renderer>::Output,
overlay: &[T]
) -> Interaction
Draws the output primitives to the next frame of the given SwapChain
.