pub struct AnchorAbout {
pub x: f64,
pub y: f64,
}Expand description
Anchor point for transform-origin, used with rotate and scale transformations.
Fields§
§x: f64X coordinate as percentage (0.0 = left, 0.5 = center, 1.0 = right)
y: f64Y coordinate as percentage (0.0 = top, 0.5 = center, 1.0 = bottom)
Implementations§
Source§impl AnchorAbout
impl AnchorAbout
Sourcepub const BOTTOM_LEFT: Self
pub const BOTTOM_LEFT: Self
Bottom-left corner
Sourcepub const BOTTOM_RIGHT: Self
pub const BOTTOM_RIGHT: Self
Bottom-right corner
Sourcepub fn as_fractions(&self) -> (f64, f64)
pub fn as_fractions(&self) -> (f64, f64)
Returns the anchor point as fractions (0.0 to 1.0)
Trait Implementations§
Source§impl Clone for AnchorAbout
impl Clone for AnchorAbout
Source§fn clone(&self) -> AnchorAbout
fn clone(&self) -> AnchorAbout
Returns a duplicate of the value. Read more
1.0.0 · 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 AnchorAbout
impl Debug for AnchorAbout
Source§impl Default for AnchorAbout
impl Default for AnchorAbout
Source§fn default() -> AnchorAbout
fn default() -> AnchorAbout
Returns the “default value” for a type. Read more
Source§impl PartialEq for AnchorAbout
impl PartialEq for AnchorAbout
Source§impl StylePropValue for AnchorAbout
impl StylePropValue for AnchorAbout
fn interpolate(&self, other: &Self, value: f64) -> Option<Self>
fn debug_view(&self) -> Option<Box<dyn View>>
fn combine(&self, _other: &Self) -> CombineResult<Self>
Source§fn content_hash(&self) -> u64
fn content_hash(&self) -> u64
Compute a content-based hash for this value. Read more
impl Copy for AnchorAbout
impl StructuralPartialEq for AnchorAbout
Auto Trait Implementations§
impl Freeze for AnchorAbout
impl RefUnwindSafe for AnchorAbout
impl Send for AnchorAbout
impl Sync for AnchorAbout
impl Unpin for AnchorAbout
impl UnwindSafe for AnchorAbout
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more