pub struct RelocateRenderElement<E> { /* private fields */ }
Expand description
A element that allows to offset the location of an existing element
Implementations§
Trait Implementations§
Source§impl<E: Debug> Debug for RelocateRenderElement<E>
impl<E: Debug> Debug for RelocateRenderElement<E>
Source§impl<E: Element> Element for RelocateRenderElement<E>
impl<E: Element> Element for RelocateRenderElement<E>
Source§fn current_commit(&self) -> CommitCounter
fn current_commit(&self) -> CommitCounter
Get the current commit position of this element
Source§fn geometry(&self, scale: Scale<f64>) -> Rectangle<i32, Physical>
fn geometry(&self, scale: Scale<f64>) -> Rectangle<i32, Physical>
Get the geometry relative to the output
Source§fn location(&self, scale: Scale<f64>) -> Point<i32, Physical>
fn location(&self, scale: Scale<f64>) -> Point<i32, Physical>
Get the location relative to the output
Source§fn damage_since(
&self,
scale: Scale<f64>,
commit: Option<CommitCounter>,
) -> DamageSet<i32, Physical>
fn damage_since( &self, scale: Scale<f64>, commit: Option<CommitCounter>, ) -> DamageSet<i32, Physical>
Get the damage since the provided commit relative to the element
Source§fn opaque_regions(&self, scale: Scale<f64>) -> OpaqueRegions<i32, Physical>
fn opaque_regions(&self, scale: Scale<f64>) -> OpaqueRegions<i32, Physical>
Get the opaque regions of the element relative to the element
Source§impl<R: Renderer, E: RenderElement<R>> RenderElement<R> for RelocateRenderElement<E>
impl<R: Renderer, E: RenderElement<R>> RenderElement<R> for RelocateRenderElement<E>
Source§fn draw(
&self,
frame: &mut <R as Renderer>::Frame<'_>,
src: Rectangle<f64, Buffer>,
dst: Rectangle<i32, Physical>,
damage: &[Rectangle<i32, Physical>],
opaque_regions: &[Rectangle<i32, Physical>],
) -> Result<(), <R as Renderer>::Error>
fn draw( &self, frame: &mut <R as Renderer>::Frame<'_>, src: Rectangle<f64, Buffer>, dst: Rectangle<i32, Physical>, damage: &[Rectangle<i32, Physical>], opaque_regions: &[Rectangle<i32, Physical>], ) -> Result<(), <R as Renderer>::Error>
Draw this element
Source§fn underlying_storage(&self, renderer: &mut R) -> Option<UnderlyingStorage<'_>>
fn underlying_storage(&self, renderer: &mut R) -> Option<UnderlyingStorage<'_>>
Get the underlying storage of this element, may be used to optimize rendering (eg. drm planes)
Auto Trait Implementations§
impl<E> Freeze for RelocateRenderElement<E>where
E: Freeze,
impl<E> RefUnwindSafe for RelocateRenderElement<E>where
E: RefUnwindSafe,
impl<E> Send for RelocateRenderElement<E>where
E: Send,
impl<E> Sync for RelocateRenderElement<E>where
E: Sync,
impl<E> Unpin for RelocateRenderElement<E>where
E: Unpin,
impl<E> UnwindSafe for RelocateRenderElement<E>where
E: UnwindSafe,
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.