#[repr(C)]pub struct ShadowVertex {
pub position: [f32; 2],
pub local_uv: [f32; 2],
pub shadow_color: [f32; 4],
pub corner_radii: [f32; 4],
pub shadow_params: [f32; 4],
pub shape_offset: [f32; 4],
}Expand description
Vertex for the shadow pipeline (box shadows with Gaussian blur).
Fields§
§position: [f32; 2]§local_uv: [f32; 2]Local UV coordinates (0..1) within the shadow quad bounds.
shadow_color: [f32; 4]§corner_radii: [f32; 4]§shadow_params: [f32; 4][shape_width, shape_height, blur_radius, spread].
shape_offset: [f32; 4][offset_x, offset_y, 0, 0] — offset of inner shape center within shadow quad.
Implementations§
Source§impl ShadowVertex
impl ShadowVertex
Sourcepub fn from_shadow_quad(
shadow: &ShadowQuad,
scale_factor: f32,
) -> [ShadowVertex; 4]
pub fn from_shadow_quad( shadow: &ShadowQuad, scale_factor: f32, ) -> [ShadowVertex; 4]
Convert a shadow quad to 4 vertices.
Trait Implementations§
Source§impl Clone for ShadowVertex
impl Clone for ShadowVertex
Source§fn clone(&self) -> ShadowVertex
fn clone(&self) -> ShadowVertex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ShadowVertex
Source§impl Debug for ShadowVertex
impl Debug for ShadowVertex
impl Pod for ShadowVertex
Auto Trait Implementations§
impl Freeze for ShadowVertex
impl RefUnwindSafe for ShadowVertex
impl Send for ShadowVertex
impl Sync for ShadowVertex
impl Unpin for ShadowVertex
impl UnsafeUnpin for ShadowVertex
impl UnwindSafe for ShadowVertex
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.