pub struct SubdivisionRanges<S = f32> {
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§
source§impl<S> SubdivisionRanges<S>where
S: Copy,
impl<S> SubdivisionRanges<S>where
S: Copy,
sourcepub fn rects(&self) -> [Rect<S>; 4]
pub fn rects(&self) -> [Rect<S>; 4]
The Rect
s representing each of the four subdivisions.
Subdivisions are yielded in the following order:
- Bottom left
- Bottom right
- Top left
- Top right
sourcepub fn rects_iter(self) -> Subdivisions<S> ⓘ
pub fn rects_iter(self) -> Subdivisions<S> ⓘ
The same as rects
but each subdivision is yielded via the returned Iterator
.
Trait Implementations§
source§impl<S> Clone for SubdivisionRanges<S>where
S: Clone,
impl<S> Clone for SubdivisionRanges<S>where
S: Clone,
source§fn clone(&self) -> SubdivisionRanges<S>
fn clone(&self) -> SubdivisionRanges<S>
Returns a copy 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<S> Debug for SubdivisionRanges<S>where
S: Debug,
impl<S> Debug for SubdivisionRanges<S>where
S: Debug,
source§impl<S> PartialEq for SubdivisionRanges<S>where
S: PartialEq,
impl<S> PartialEq for SubdivisionRanges<S>where
S: PartialEq,
source§fn eq(&self, other: &SubdivisionRanges<S>) -> bool
fn eq(&self, other: &SubdivisionRanges<S>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<S> PartialOrd for SubdivisionRanges<S>where
S: PartialOrd,
impl<S> PartialOrd for SubdivisionRanges<S>where
S: PartialOrd,
source§fn partial_cmp(&self, other: &SubdivisionRanges<S>) -> Option<Ordering>
fn partial_cmp(&self, other: &SubdivisionRanges<S>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<S> Copy for SubdivisionRanges<S>where
S: Copy,
impl<S> StructuralPartialEq for SubdivisionRanges<S>
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§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
impl<T, U> ConvertInto<U> for Twhere
U: ConvertFrom<T>,
source§fn convert_into(self) -> U
fn convert_into(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§fn convert_unclamped_into(self) -> U
fn convert_unclamped_into(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
source§fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
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