#[repr(C)]pub struct KuiClip {
pub rect: [f32; 4],
pub radius: [f32; 4],
pub transform: [f32; 4],
pub inner: [f32; 4],
pub inner_radius: [f32; 4],
}Expand description
One clip a frame’s quads name, in physical pixels. Mirrors
kui_core::Clip, so KuiDrawData::clips is a cast and not a copy.
Fields§
§rect: [f32; 4]Clip rect: x, y, w, h. Pixels outside are transparent.
radius: [f32; 4]Corner radii (physical px), clockwise from the top-left: pixels outside the rounded clip are transparent too. All zero — every clip of a frame with no rounded clipper — is the plain rect clip.
transform: [f32; 4]The turn every quad naming this entry is drawn through (ADR
0043): angle in radians (clockwise, y down), scale, tx, ty —
pixel = R(angle) · scale · p + (tx, ty) for p a point of the
quad’s own rect. {0, 1, 0, 0}, the identity, on every entry of a
frame that turns nothing. ABI 27.
inner: [f32; 4]A second clip in the quad’s own space, before the turn: x, y, w, h, from clipping nodes inside a turned subtree. The clip that clips nothing (a rect past any pixel) when nothing inside a turn clips.
inner_radius: [f32; 4]inner’s corner radii, as radius is rect’s.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KuiClip
impl RefUnwindSafe for KuiClip
impl Send for KuiClip
impl Sync for KuiClip
impl Unpin for KuiClip
impl UnsafeUnpin for KuiClip
impl UnwindSafe for KuiClip
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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.