pub struct BackgroundPosition {
pub x: Coord,
pub y: Coord,
}Expand description
Where the image sits in the box, from background-position.
A percentage aligns that fraction of the image with the same
fraction of the box, which is what makes 50% centre it. A length
is an offset from the box’s top left corner.
Fields§
§x: CoordAcross the box.
y: CoordDown the box.
Implementations§
Source§impl BackgroundPosition
impl BackgroundPosition
Sourcepub const ORIGIN: BackgroundPosition
pub const ORIGIN: BackgroundPosition
0% 0%: the image’s top left corner in the box’s own.
Trait Implementations§
Source§impl Clone for BackgroundPosition
impl Clone for BackgroundPosition
Source§fn clone(&self) -> BackgroundPosition
fn clone(&self) -> BackgroundPosition
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 moreimpl Copy for BackgroundPosition
Source§impl Debug for BackgroundPosition
impl Debug for BackgroundPosition
Source§impl PartialEq for BackgroundPosition
impl PartialEq for BackgroundPosition
Source§impl Serialize for BackgroundPosition
impl Serialize for BackgroundPosition
impl StructuralPartialEq for BackgroundPosition
Auto Trait Implementations§
impl Freeze for BackgroundPosition
impl RefUnwindSafe for BackgroundPosition
impl Send for BackgroundPosition
impl Sync for BackgroundPosition
impl Unpin for BackgroundPosition
impl UnsafeUnpin for BackgroundPosition
impl UnwindSafe for BackgroundPosition
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,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.