#[repr(C)]pub struct BoxVertex {
pub position: [f32; 2],
pub local: [f32; 2],
pub half: [f32; 2],
pub radius: f32,
pub border_width: f32,
pub fill: [f32; 4],
pub border: [f32; 4],
pub shadow_offset: [f32; 2],
pub shadow_blur: f32,
pub shadow_spread: f32,
pub shadow_color: [f32; 4],
}Expand description
One corner of a box, with everything the shader needs to draw it.
local is the pixel offset from the box’s centre and half the half-extents
in pixels, so the fragment shader can measure distance to the rounded edge in
pixels rather than in normalised coordinates.
Fields§
§position: [f32; 2]§local: [f32; 2]§half: [f32; 2]§radius: f32§border_width: f32§fill: [f32; 4]§border: [f32; 4]§shadow_offset: [f32; 2]§shadow_blur: f32§shadow_spread: f32§shadow_color: [f32; 4]Trait Implementations§
impl Copy for BoxVertex
impl Pod for BoxVertex
Auto Trait Implementations§
impl Freeze for BoxVertex
impl RefUnwindSafe for BoxVertex
impl Send for BoxVertex
impl Sync for BoxVertex
impl Unpin for BoxVertex
impl UnsafeUnpin for BoxVertex
impl UnwindSafe for BoxVertex
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.