Enum iced_renderer::compositor::Compositor
source · pub enum Compositor {
TinySkia(Compositor),
}
Variants§
TinySkia(Compositor)
Trait Implementations§
source§impl Compositor for Compositor
impl Compositor for Compositor
source§fn new<W: Window + Clone>(
settings: Self::Settings,
compatible_window: W
) -> Result<Self, Error>
fn new<W: Window + Clone>( settings: Self::Settings, compatible_window: W ) -> Result<Self, Error>
Creates a new
Compositor
.source§fn create_renderer(&self) -> Self::Renderer
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
) -> Surface
fn create_surface<W: Window + Clone>( &mut self, window: W, width: u32, height: u32 ) -> Surface
Crates a new
Surface
for the given window.source§fn configure_surface(&mut self, surface: &mut Surface, width: u32, height: u32)
fn configure_surface(&mut self, surface: &mut Surface, width: u32, height: u32)
Configures a new
Surface
with the given dimensions.source§fn fetch_information(&self) -> Information
fn fetch_information(&self) -> Information
Returns
Information
used by this Compositor
.source§fn present<T: AsRef<str>>(
&mut self,
renderer: &mut Self::Renderer,
surface: &mut Self::Surface,
viewport: &Viewport,
background_color: Color,
overlay: &[T]
) -> Result<(), SurfaceError>
fn present<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, overlay: &[T] ) -> Result<(), SurfaceError>
source§fn screenshot<T: AsRef<str>>(
&mut self,
renderer: &mut Self::Renderer,
surface: &mut Self::Surface,
viewport: &Viewport,
background_color: Color,
overlay: &[T]
) -> Vec<u8>
fn screenshot<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, surface: &mut Self::Surface, viewport: &Viewport, background_color: Color, overlay: &[T] ) -> 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.Auto Trait Implementations§
impl !RefUnwindSafe for Compositor
impl !Send for Compositor
impl !Sync for Compositor
impl Unpin for Compositor
impl !UnwindSafe for Compositor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.