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<PanelImage>) -> PanelImage
pub fn new(source: impl Into<PanelImage>) -> PanelImage
Describe this placement of a local path, image asset or frozen Output.
Sourcepub fn width(self, width: f64) -> PanelImage
pub fn width(self, width: f64) -> PanelImage
Specify an exact frame width; infer height from the source ratio.
Sourcepub fn height(self, height: f64) -> PanelImage
pub fn height(self, height: f64) -> PanelImage
Specify an exact frame height; infer width from the source ratio.
Sourcepub fn size(self, width: f64, height: f64) -> PanelImage
pub fn size(self, width: f64, height: f64) -> PanelImage
Specify an exact frame in CSS pixels.
Sourcepub fn fit(self, fit: ObjectFit) -> PanelImage
pub fn fit(self, fit: ObjectFit) -> PanelImage
Set the fixed-source fitting policy.
Sourcepub fn position(self, position: ObjectPosition) -> PanelImage
pub fn position(self, position: ObjectPosition) -> PanelImage
Set alignment within the frame.
Sourcepub fn image_rendering(self, rendering: ImageRendering) -> PanelImage
pub fn image_rendering(self, rendering: ImageRendering) -> PanelImage
Set image sampling independently of geometry.
Trait Implementations§
Source§impl Clone for PanelImage
impl Clone for PanelImage
Source§fn clone(&self) -> PanelImage
fn clone(&self) -> PanelImage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PanelImage
impl Debug for PanelImage
Source§impl From<&Composite> for PanelImage
impl From<&Composite> for PanelImage
Source§fn from(value: &Composite) -> PanelImage
fn from(value: &Composite) -> PanelImage
Converts to this type from the input type.
Source§impl From<&ImageAsset> for PanelImage
impl From<&ImageAsset> for PanelImage
Source§fn from(asset: &ImageAsset) -> PanelImage
fn from(asset: &ImageAsset) -> PanelImage
Converts to this type from the input type.
Source§impl From<&Output> for PanelImage
impl From<&Output> for PanelImage
Source§fn from(output: &Output) -> PanelImage
fn from(output: &Output) -> PanelImage
Converts to this type from the input type.
Source§impl From<&Path> for PanelImage
impl From<&Path> for PanelImage
Source§fn from(path: &Path) -> PanelImage
fn from(path: &Path) -> PanelImage
Converts to this type from the input type.
Source§impl From<&PathBuf> for PanelImage
impl From<&PathBuf> for PanelImage
Source§fn from(path: &PathBuf) -> PanelImage
fn from(path: &PathBuf) -> PanelImage
Converts to this type from the input type.
Source§impl From<&str> for PanelImage
impl From<&str> for PanelImage
Source§fn from(path: &str) -> PanelImage
fn from(path: &str) -> PanelImage
Converts to this type from the input type.
Source§impl From<Composite> for PanelImage
impl From<Composite> for PanelImage
Source§fn from(value: Composite) -> PanelImage
fn from(value: Composite) -> PanelImage
Converts to this type from the input type.
Source§impl From<ImageAsset> for PanelImage
impl From<ImageAsset> for PanelImage
Source§fn from(asset: ImageAsset) -> PanelImage
fn from(asset: ImageAsset) -> PanelImage
Converts to this type from the input type.
Source§impl From<Output> for PanelImage
impl From<Output> for PanelImage
Source§fn from(output: Output) -> PanelImage
fn from(output: Output) -> PanelImage
Converts to this type from the input type.
Source§impl From<PathBuf> for PanelImage
impl From<PathBuf> for PanelImage
Source§fn from(path: PathBuf) -> PanelImage
fn from(path: PathBuf) -> PanelImage
Converts to this type from the input type.
Source§impl From<String> for PanelImage
impl From<String> for PanelImage
Source§fn from(path: String) -> PanelImage
fn from(path: String) -> PanelImage
Converts to this type from the input type.
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.