#[repr(C)]pub struct NormalizedRadialColorStop {
pub angle: AngleValue,
pub color: ColorOrSystem,
}Fields§
§angle: AngleValue§color: ColorOrSystemColor for this gradient stop. Can be a concrete color or a system color reference.
Implementations§
Source§impl NormalizedRadialColorStop
impl NormalizedRadialColorStop
Sourcepub const fn new(angle: AngleValue, color: ColorU) -> Self
pub const fn new(angle: AngleValue, color: ColorU) -> Self
Create a new normalized radial color stop with a concrete color.
Sourcepub const fn system(angle: AngleValue, system_ref: SystemColorRef) -> Self
pub const fn system(angle: AngleValue, system_ref: SystemColorRef) -> Self
Create a new normalized radial color stop with a system color.
Sourcepub const fn with_color_or_system(
angle: AngleValue,
color: ColorOrSystem,
) -> Self
pub const fn with_color_or_system( angle: AngleValue, color: ColorOrSystem, ) -> Self
Create a normalized radial color stop with a ColorOrSystem directly.
Sourcepub fn resolve(&self, system_colors: &SystemColors, fallback: ColorU) -> ColorU
pub fn resolve(&self, system_colors: &SystemColors, fallback: ColorU) -> ColorU
Resolve the color against system colors.
Trait Implementations§
Source§impl Clone for NormalizedRadialColorStop
impl Clone for NormalizedRadialColorStop
Source§fn clone(&self) -> NormalizedRadialColorStop
fn clone(&self) -> NormalizedRadialColorStop
Returns a duplicate 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 Debug for NormalizedRadialColorStop
impl Debug for NormalizedRadialColorStop
Source§impl FromIterator<NormalizedRadialColorStop> for NormalizedRadialColorStopVec
impl FromIterator<NormalizedRadialColorStop> for NormalizedRadialColorStopVec
Source§fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = NormalizedRadialColorStop>,
fn from_iter<T>(iter: T) -> Selfwhere
T: IntoIterator<Item = NormalizedRadialColorStop>,
Creates a value from an iterator. Read more
Source§impl Hash for NormalizedRadialColorStop
impl Hash for NormalizedRadialColorStop
Source§impl Ord for NormalizedRadialColorStop
impl Ord for NormalizedRadialColorStop
Source§fn cmp(&self, other: &NormalizedRadialColorStop) -> Ordering
fn cmp(&self, other: &NormalizedRadialColorStop) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for NormalizedRadialColorStop
impl PartialOrd for NormalizedRadialColorStop
Source§impl PrintAsCssValue for NormalizedRadialColorStop
impl PrintAsCssValue for NormalizedRadialColorStop
fn print_as_css_value(&self) -> String
impl Eq for NormalizedRadialColorStop
impl StructuralPartialEq for NormalizedRadialColorStop
Auto Trait Implementations§
impl Freeze for NormalizedRadialColorStop
impl RefUnwindSafe for NormalizedRadialColorStop
impl Send for NormalizedRadialColorStop
impl Sync for NormalizedRadialColorStop
impl Unpin for NormalizedRadialColorStop
impl UnsafeUnpin for NormalizedRadialColorStop
impl UnwindSafe for NormalizedRadialColorStop
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