pub struct Radial {
pub start: Point,
pub start_radius: f32,
pub end: Point,
pub end_radius: f32,
pub t_min: f32,
pub t_max: f32,
pub extend_start: bool,
pub extend_end: bool,
}Expand description
A type 3 shading’s geometry.
Fields§
§start: PointThe first circle’s centre.
start_radius: f32The first circle’s radius.
end: PointThe second circle’s centre.
end_radius: f32The second circle’s radius.
t_min: f32/Domain’s low bound.
t_max: f32/Domain’s high bound.
extend_start: boolWhether the gradient continues past the first circle.
extend_end: boolWhether it continues past the second.
Implementations§
Source§impl Radial
impl Radial
Sourcepub fn is_decreasing(&self) -> bool
pub fn is_decreasing(&self) -> bool
Whether the circles shrink as the gradient advances, which decides which root of the quadratic to prefer.
The centre distance is truncated to an integer before the
comparison, so a shading whose centres are 3.9 units apart with
dr == -3.5 counts as decreasing while one with dr == -3.0 does
not. Reproduced.
Trait Implementations§
impl Copy for Radial
impl StructuralPartialEq for Radial
Auto Trait Implementations§
impl Freeze for Radial
impl RefUnwindSafe for Radial
impl Send for Radial
impl Sync for Radial
impl Unpin for Radial
impl UnsafeUnpin for Radial
impl UnwindSafe for Radial
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