#[repr(C)]pub struct KuiQuad {
pub x: f32,
pub y: f32,
pub w: f32,
pub h: f32,
pub color: [f32; 4],
pub border_color: [f32; 4],
pub radius: [f32; 4],
pub border_w: f32,
pub blur: f32,
pub kind: u32,
pub clip: u32,
pub uv: [u32; 4],
}Expand description
One quad of a frame’s draw list, in physical pixels: a rounded
rectangle, border, shadow, glyph, image or segment, told apart by
kind. A renderer draws them in order, every one with the same
instanced pipeline; KuiDrawData hands out the array.
Fields§
§x: f32§y: f32§w: f32§h: f32§color: [f32; 4]§border_color: [f32; 4]§radius: [f32; 4]Corner radii (physical px), clockwise from the top-left.
border_w: f32§blur: f32KUI_QUAD_SHADOW only: blur radius (physical px), which is also how
far x/y/w/h is inflated past the shape being blurred.
kind: u32KUI_QUAD_*
clip: u32Which entry of KuiDrawData::clips clips this quad; entry zero
clips nothing.
uv: [u32; 4]Atlas texels: x, y, w, h. KUI_QUAD_SEGMENT: the endpoints as
float bits (see kui_core::Quad::segment_ends).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KuiQuad
impl RefUnwindSafe for KuiQuad
impl Send for KuiQuad
impl Sync for KuiQuad
impl Unpin for KuiQuad
impl UnsafeUnpin for KuiQuad
impl UnwindSafe for KuiQuad
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.