#[repr(C)]pub struct KuiGradient {
pub kind: u32,
pub angle: f32,
pub at_x: f32,
pub at_y: f32,
pub stops: *const KuiGradientStop,
pub stops_len: usize,
}Expand description
A box’s gradient (KuiSpec.gradient,
docs/adr/0042-a-gradient-is-an-image-the-core-paints.md): linear
along angle — turns clockwise from east, in the box’s unit square —
or radial out from (at_x, at_y), fractions of the box, to its
farthest corner. stops_len stops, two or more.
Fields§
§kind: u32KUI_GRADIENT_*.
angle: f32§at_x: f32§at_y: f32§stops: *const KuiGradientStop§stops_len: usizeTrait Implementations§
Source§impl Clone for KuiGradient
impl Clone for KuiGradient
impl Copy for KuiGradient
Auto Trait Implementations§
impl !Send for KuiGradient
impl !Sync for KuiGradient
impl Freeze for KuiGradient
impl RefUnwindSafe for KuiGradient
impl Unpin for KuiGradient
impl UnsafeUnpin for KuiGradient
impl UnwindSafe for KuiGradient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.