[][src]Enum druid::widget::Axis

pub enum Axis {
    Horizontal,
    Vertical,
}

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

Horizontal

The x axis

Vertical

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]

impl StructuralPartialEq for Axis[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AnyEq for T where
    T: PartialEq<T> + Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.