pub struct TextureView { /* private fields */ }Expand description
A declarative view of an externally rendered scene texture. See the module docs.
Implementations§
Source§impl TextureView
impl TextureView
Sourcepub fn fit(self, fit: TextureFit) -> Self
pub fn fit(self, fit: TextureFit) -> Self
How the texture is placed in the box. Needs Self::source_size to
keep an aspect ratio; without it every fit fills the box.
Sourcepub fn source_size(self, size: Size) -> Self
pub fn source_size(self, size: Size) -> Self
The texture’s own extent (a video’s resolution), which fit keeps the
aspect ratio of. Only the ratio matters.
Sourcepub fn size(self, size: Size) -> Self
pub fn size(self, size: Size) -> Self
A fixed size, clamped into the parent’s constraints. Overrides
Self::expand when called after it.
Sourcepub fn corner_radius(self, radius: f64) -> Self
pub fn corner_radius(self, radius: f64) -> Self
Clip the box to corners of radius; 0.0 (the default) is square.
Sourcepub fn label(self, label: impl Into<String>) -> Self
pub fn label(self, label: impl Into<String>) -> Self
An accessible label, contributing a Role::Image semantics node; an
unlabelled texture view is decorative and reports nothing.
Trait Implementations§
Source§impl Clone for TextureView
impl Clone for TextureView
Source§impl Debug for TextureView
impl Debug for TextureView
Source§impl PartialEq for TextureView
impl PartialEq for TextureView
impl StructuralPartialEq for TextureView
Source§impl<State: 'static> View<State> for TextureView
impl<State: 'static> View<State> for TextureView
Source§type Element = TextureWidget
type Element = TextureWidget
The retained widget this view produces.
Source§fn build(&self, _ctx: &mut BuildCtx<'_>) -> TextureWidget
fn build(&self, _ctx: &mut BuildCtx<'_>) -> TextureWidget
Materialise a fresh widget for this view.
Source§fn rebuild(
&self,
prev: &Self,
element: &mut TextureWidget,
_ctx: &mut BuildCtx<'_>,
) -> ChangeFlags
fn rebuild( &self, prev: &Self, element: &mut TextureWidget, _ctx: &mut BuildCtx<'_>, ) -> ChangeFlags
Reconcile
prev (the previous view of the same type) against the live
element, mutating it in place and reporting what changed.Auto Trait Implementations§
impl Freeze for TextureView
impl RefUnwindSafe for TextureView
impl Send for TextureView
impl Sync for TextureView
impl Unpin for TextureView
impl UnsafeUnpin for TextureView
impl UnwindSafe for TextureView
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.