#[repr(C)]pub struct PackedGradient {
pub colors: [[u32; 2]; 8],
pub offsets: [u32; 4],
pub direction: [f32; 4],
}
Expand description
Packed Gradient
data for use in shader code.
Fields§
§colors: [[u32; 2]; 8]
8 colors, each channel = 16 bit float, 2 colors packed into 1 u32
offsets: [u32; 4]
8 offsets, 8x 16 bit floats packed into 4 u32s
direction: [f32; 4]
[start.x, start.y, end.x, end.y]
in logical points
Implementations§
Trait Implementations§
Source§impl Clone for PackedGradient
impl Clone for PackedGradient
Source§fn clone(&self) -> PackedGradient
fn clone(&self) -> PackedGradient
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PackedGradient
impl Debug for PackedGradient
Source§impl Default for PackedGradient
impl Default for PackedGradient
Source§fn default() -> PackedGradient
fn default() -> PackedGradient
Returns the “default value” for a type. Read more
Source§impl PartialEq for PackedGradient
impl PartialEq for PackedGradient
impl Copy for PackedGradient
impl Pod for PackedGradient
impl StructuralPartialEq for PackedGradient
Auto Trait Implementations§
impl Freeze for PackedGradient
impl RefUnwindSafe for PackedGradient
impl Send for PackedGradient
impl Sync for PackedGradient
impl Unpin for PackedGradient
impl UnwindSafe for PackedGradient
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
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
.