pub enum SizeHint {
Scale(OrderedFloat<f32>),
Width(u32),
Height(u32),
Size(u32, u32),
}
Expand description
Given as a hint for image loading requests.
Used mostly for rendering SVG:s to a good size. The size is measured in texels, with the pixels per point already factored in.
All variants will preserve the original aspect ratio.
Variants§
Scale(OrderedFloat<f32>)
Scale original size by some factor.
Width(u32)
Scale to width.
Height(u32)
Scale to height.
Size(u32, u32)
Scale to size.
Trait Implementations§
source§impl Ord for SizeHint
impl Ord for SizeHint
source§impl PartialOrd for SizeHint
impl PartialOrd for SizeHint
impl Copy for SizeHint
impl Eq for SizeHint
impl StructuralPartialEq for SizeHint
Auto Trait Implementations§
impl Freeze for SizeHint
impl RefUnwindSafe for SizeHint
impl Send for SizeHint
impl Sync for SizeHint
impl Unpin for SizeHint
impl UnwindSafe for SizeHint
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)