Struct nannou_core::geom::rect::SubdivisionRanges [−][src]
pub struct SubdivisionRanges<S = Default> {
pub x_a: Range<S>,
pub x_b: Range<S>,
pub y_a: Range<S>,
pub y_b: Range<S>,
}
Expand description
The ranges that describe the subdivisions of a Rect
.
Fields
x_a: Range<S>
The first half of the x range.
x_b: Range<S>
The second half of the x range.
y_a: Range<S>
The first half of the y range.
y_b: Range<S>
The second half of the y range.
Implementations
The Rect
s representing each of the four subdivisions.
Subdivisions are yielded in the following order:
- Bottom left
- Bottom right
- Top left
- Top right
pub fn rects_iter(self) -> Subdivisions<S>ⓘNotable traits for Subdivisions<S>impl<S> Iterator for Subdivisions<S> where
S: Copy, type Item = Rect<S>;
pub fn rects_iter(self) -> Subdivisions<S>ⓘNotable traits for Subdivisions<S>impl<S> Iterator for Subdivisions<S> where
S: Copy, type Item = Rect<S>;
impl<S> Iterator for Subdivisions<S> where
S: Copy, type Item = Rect<S>;
The same as rects
but each subdivision is yielded via the returned Iterator
.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<S> RefUnwindSafe for SubdivisionRanges<S> where
S: RefUnwindSafe,
impl<S> Send for SubdivisionRanges<S> where
S: Send,
impl<S> Sync for SubdivisionRanges<S> where
S: Sync,
impl<S> Unpin for SubdivisionRanges<S> where
S: Unpin,
impl<S> UnwindSafe for SubdivisionRanges<S> where
S: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
Mutably borrows from an owned value. Read more
Convert into T with values clamped to the color defined bounds Read more
Convert into T. The resulting color might be invalid in its color space Read more
Convert into T, returning ok if the color is inside of its defined range,
otherwise an OutOfBounds
error is returned which contains the unclamped color. Read more