pub struct GradientRadius {
pub base: GradientRadiusBase,
pub circle: bool,
pub radii: Size,
}
Expand description
The radial gradient radius length in both dimensions.
Fields§
§base: GradientRadiusBase
How the base length is calculated. The base length is the 100.pct()
length.
circle: bool
If the gradient is circular or elliptical.
If true
the radius is the same in both dimensions, if false
the radius can be different.
radii: Size
The length of the rendered gradient stops.
Implementations§
source§impl GradientRadius
impl GradientRadius
sourcepub fn closest_side(radius: impl Into<Size>) -> GradientRadius
pub fn closest_side(radius: impl Into<Size>) -> GradientRadius
Ellipse radii relative from center to the closest edge.
sourcepub fn closest_corner(radius: impl Into<Size>) -> GradientRadius
pub fn closest_corner(radius: impl Into<Size>) -> GradientRadius
Ellipse radii relative from center to the closest corner.
sourcepub fn farthest_side(radius: impl Into<Size>) -> GradientRadius
pub fn farthest_side(radius: impl Into<Size>) -> GradientRadius
Ellipse radii relative from center to the farthest edge.
sourcepub fn farthest_corner(radius: impl Into<Size>) -> GradientRadius
pub fn farthest_corner(radius: impl Into<Size>) -> GradientRadius
Ellipse radii relative from center to the farthest corner.
sourcepub fn circle(self) -> GradientRadius
pub fn circle(self) -> GradientRadius
Enable circular radius.
Trait Implementations§
source§impl Clone for GradientRadius
impl Clone for GradientRadius
source§fn clone(&self) -> GradientRadius
fn clone(&self) -> GradientRadius
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GradientRadius
impl Debug for GradientRadius
source§impl Default for GradientRadius
impl Default for GradientRadius
source§fn default() -> GradientRadius
fn default() -> GradientRadius
farthest_corner(100.pct())
source§impl<'de> Deserialize<'de> for GradientRadius
impl<'de> Deserialize<'de> for GradientRadius
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GradientRadius, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GradientRadius, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<B, R> From<(B, R)> for GradientRadius
impl<B, R> From<(B, R)> for GradientRadius
source§fn from(_: (B, R)) -> GradientRadius
fn from(_: (B, R)) -> GradientRadius
Ellipse GradientRadiusBase
and ellipse radius.
source§impl From<Dip> for GradientRadius
impl From<Dip> for GradientRadius
source§fn from(l: Dip) -> GradientRadius
fn from(l: Dip) -> GradientRadius
Conversion to Length::Dip
and to radius.
source§impl From<Factor> for GradientRadius
impl From<Factor> for GradientRadius
source§fn from(norm: Factor) -> GradientRadius
fn from(norm: Factor) -> GradientRadius
Conversion to Length::Factor
and to radius.
source§impl From<FactorPercent> for GradientRadius
impl From<FactorPercent> for GradientRadius
source§fn from(percent: FactorPercent) -> GradientRadius
fn from(percent: FactorPercent) -> GradientRadius
Conversion to Length::Factor
and to radius.
source§impl From<GradientRadiusBase> for GradientRadius
impl From<GradientRadiusBase> for GradientRadius
source§fn from(base: GradientRadiusBase) -> GradientRadius
fn from(base: GradientRadiusBase) -> GradientRadius
Ellipse fill the base radius.
source§impl From<Length> for GradientRadius
impl From<Length> for GradientRadius
source§fn from(radius: Length) -> GradientRadius
fn from(radius: Length) -> GradientRadius
Ellipse GradientRadius::farthest_corner
.
source§impl From<Px> for GradientRadius
impl From<Px> for GradientRadius
source§fn from(l: Px) -> GradientRadius
fn from(l: Px) -> GradientRadius
Conversion to Length::Px
and to radius.
source§impl From<Size> for GradientRadius
impl From<Size> for GradientRadius
source§fn from(radii: Size) -> GradientRadius
fn from(radii: Size) -> GradientRadius
Ellipse GradientRadius::farthest_corner
.
source§impl From<f32> for GradientRadius
impl From<f32> for GradientRadius
source§fn from(f: f32) -> GradientRadius
fn from(f: f32) -> GradientRadius
Conversion to Length::DipF32
and to radius.
source§impl From<i32> for GradientRadius
impl From<i32> for GradientRadius
source§fn from(i: i32) -> GradientRadius
fn from(i: i32) -> GradientRadius
Conversion to Length::Dip
and to radius.
source§impl<B, R> IntoVar<GradientRadius> for (B, R)
impl<B, R> IntoVar<GradientRadius> for (B, R)
source§fn into_var(self) -> <(B, R) as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <(B, R) as IntoVar<GradientRadius>>::Var
Ellipse GradientRadiusBase
and ellipse radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for Dip
impl IntoVar<GradientRadius> for Dip
source§fn into_var(self) -> <Dip as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <Dip as IntoVar<GradientRadius>>::Var
Conversion to Length::Dip
and to radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for Factor
impl IntoVar<GradientRadius> for Factor
source§fn into_var(self) -> <Factor as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <Factor as IntoVar<GradientRadius>>::Var
Conversion to Length::Factor
and to radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for FactorPercent
impl IntoVar<GradientRadius> for FactorPercent
source§fn into_var(self) -> <FactorPercent as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <FactorPercent as IntoVar<GradientRadius>>::Var
Conversion to Length::Factor
and to radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for GradientRadiusBase
impl IntoVar<GradientRadius> for GradientRadiusBase
source§fn into_var(self) -> <GradientRadiusBase as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <GradientRadiusBase as IntoVar<GradientRadius>>::Var
Ellipse fill the base radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for Length
impl IntoVar<GradientRadius> for Length
source§fn into_var(self) -> <Length as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <Length as IntoVar<GradientRadius>>::Var
Ellipse GradientRadius::farthest_corner
.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for Px
impl IntoVar<GradientRadius> for Px
source§fn into_var(self) -> <Px as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <Px as IntoVar<GradientRadius>>::Var
Conversion to Length::Px
and to radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for Size
impl IntoVar<GradientRadius> for Size
source§fn into_var(self) -> <Size as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <Size as IntoVar<GradientRadius>>::Var
Ellipse GradientRadius::farthest_corner
.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for f32
impl IntoVar<GradientRadius> for f32
source§fn into_var(self) -> <f32 as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <f32 as IntoVar<GradientRadius>>::Var
Conversion to Length::DipF32
and to radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl IntoVar<GradientRadius> for i32
impl IntoVar<GradientRadius> for i32
source§fn into_var(self) -> <i32 as IntoVar<GradientRadius>>::Var
fn into_var(self) -> <i32 as IntoVar<GradientRadius>>::Var
Conversion to Length::Dip
and to radius.
source§fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
fn into_boxed_var(self) -> Box<dyn VarBoxed<T>>where
Self: Sized,
BoxedVar<T>
. Read moresource§impl PartialEq for GradientRadius
impl PartialEq for GradientRadius
source§impl Serialize for GradientRadius
impl Serialize for GradientRadius
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl<B, R> IntoValue<GradientRadius> for (B, R)
impl IntoValue<GradientRadius> for Dip
impl IntoValue<GradientRadius> for Factor
impl IntoValue<GradientRadius> for FactorPercent
impl IntoValue<GradientRadius> for GradientRadiusBase
impl IntoValue<GradientRadius> for Length
impl IntoValue<GradientRadius> for Px
impl IntoValue<GradientRadius> for Size
impl IntoValue<GradientRadius> for f32
impl IntoValue<GradientRadius> for i32
impl StructuralPartialEq for GradientRadius
Auto Trait Implementations§
impl Freeze for GradientRadius
impl RefUnwindSafe for GradientRadius
impl Send for GradientRadius
impl Sync for GradientRadius
impl Unpin for GradientRadius
impl UnwindSafe for GradientRadius
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.