[−][src]Enum druid::widget::Axis
An axis in visual space.
Most often used by widgets to describe the direction in which they grow as their number of children increases. Has some methods for manipulating geometry with respect to the axis.
Variants
The x axis
The y axis
Implementations
impl Axis
[src]
pub fn cross(self) -> Axis
[src]
Get the axis perpendicular to this one.
pub fn major(self, coords: Size) -> f64
[src]
Extract from the argument the magnitude along this axis
pub fn minor(self, coords: Size) -> f64
[src]
Extract from the argument the magnitude along the perpendicular axis
pub fn major_span(self, rect: Rect) -> (f64, f64)
[src]
Extract the extent of the argument in this axis as a pair.
pub fn minor_span(self, rect: Rect) -> (f64, f64)
[src]
Extract the extent of the argument in the minor axis as a pair.
pub fn major_pos(self, pos: Point) -> f64
[src]
Extract the coordinate locating the argument with respect to this axis.
pub fn minor_pos(self, pos: Point) -> f64
[src]
Extract the coordinate locating the argument with respect to the perpendicular axis.
pub fn pack(self, major: f64, minor: f64) -> (f64, f64)
[src]
Arrange the major and minor measurements with respect to this axis such that it forms an (x, y) pair.
Trait Implementations
impl Clone for Axis
[src]
impl Copy for Axis
[src]
impl Data for Axis
[src]
impl Debug for Axis
[src]
impl PartialEq<Axis> for Axis
[src]
pub fn eq(&self, other: &Axis) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for Axis
[src]
Auto Trait Implementations
impl RefUnwindSafe for Axis
[src]
impl Send for Axis
[src]
impl Sync for Axis
[src]
impl Unpin for Axis
[src]
impl UnwindSafe for Axis
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyEq for T where
T: PartialEq<T> + Any,
[src]
T: PartialEq<T> + Any,
pub fn equals(&self, other: &(dyn Any + 'static)) -> bool
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
pub fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
pub fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,