pub struct PanelImage { /* private fields */ }Expand description
Placement options for an image or an already frozen native output. A path is read when the content is admitted to a Canvas.
Implementations§
Source§impl PanelImage
impl PanelImage
Sourcepub fn new(source: impl Into<Self>) -> Self
pub fn new(source: impl Into<Self>) -> Self
Describe this placement of a local path, image asset or frozen Output.
Sourcepub fn width(self, width: f64) -> Self
pub fn width(self, width: f64) -> Self
Specify an exact frame width; infer height from the source ratio.
Sourcepub fn height(self, height: f64) -> Self
pub fn height(self, height: f64) -> Self
Specify an exact frame height; infer width from the source ratio.
Sourcepub fn position(self, position: ObjectPosition) -> Self
pub fn position(self, position: ObjectPosition) -> Self
Set alignment within the frame.
Sourcepub fn image_rendering(self, rendering: ImageRendering) -> Self
pub fn image_rendering(self, rendering: ImageRendering) -> Self
Set image sampling independently of geometry.
Trait Implementations§
Source§impl Clone for PanelImage
impl Clone for PanelImage
Source§impl Debug for PanelImage
impl Debug for PanelImage
Source§impl From<&Composite> for PanelImage
impl From<&Composite> for PanelImage
Source§impl From<&ImageAsset> for PanelImage
impl From<&ImageAsset> for PanelImage
Source§fn from(asset: &ImageAsset) -> Self
fn from(asset: &ImageAsset) -> Self
Converts to this type from the input type.
Source§impl From<&Output> for PanelImage
impl From<&Output> for PanelImage
Source§impl From<&Path> for PanelImage
impl From<&Path> for PanelImage
Source§impl From<&PathBuf> for PanelImage
impl From<&PathBuf> for PanelImage
Source§impl From<&str> for PanelImage
impl From<&str> for PanelImage
Source§impl From<Composite> for PanelImage
impl From<Composite> for PanelImage
Source§impl From<ImageAsset> for PanelImage
impl From<ImageAsset> for PanelImage
Source§fn from(asset: ImageAsset) -> Self
fn from(asset: ImageAsset) -> Self
Converts to this type from the input type.
Source§impl From<Output> for PanelImage
impl From<Output> for PanelImage
Source§impl From<PathBuf> for PanelImage
impl From<PathBuf> for PanelImage
Source§impl From<String> for PanelImage
impl From<String> for PanelImage
Source§impl TryFrom<PanelImage> for PanelContent
impl TryFrom<PanelImage> for PanelContent
Auto Trait Implementations§
impl Forget for PanelImage
impl Freeze for PanelImagewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<Asset> is !null: Freeze,
PhantomData<ArcInner<Asset>>: Freeze,
*const ArcInner<PathBuf> is !null: Freeze,
PhantomData<ArcInner<PathBuf>>: Freeze,
*const ArcInner<RenderedScene> is !null: Freeze,
PhantomData<ArcInner<RenderedScene>>: Freeze,
impl Move for PanelImage
impl RefUnwindSafe for PanelImagewhere
Atomic<usize>: RefUnwindSafe,
NonZero<u32>: RefUnwindSafe,
OnceLock<AssetView>: RefUnwindSafe,
OnceLock<Arc<[u8]>>: RefUnwindSafe,
impl Send for PanelImage
impl Sync for PanelImage
impl Unpin for PanelImage
impl UnsafeUnpin for PanelImagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Asset> is !null: UnsafeUnpin,
PhantomData<ArcInner<Asset>>: UnsafeUnpin,
*const ArcInner<PathBuf> is !null: UnsafeUnpin,
PhantomData<ArcInner<PathBuf>>: UnsafeUnpin,
*const ArcInner<RenderedScene> is !null: UnsafeUnpin,
PhantomData<ArcInner<RenderedScene>>: UnsafeUnpin,
impl UnwindSafe for PanelImagewhere
RawVecInner: UnwindSafe,
Arc<Asset>: UnwindSafe,
Arc<PathBuf>: UnwindSafe,
Arc<RenderedScene>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.