#[repr(C)]pub struct GradientQuadPrimitive {
pub gradient: PackedGradient,
pub position: [f32; 2],
pub size: [f32; 2],
pub border_color: PackedSrgb,
pub border_radius: [f32; 4],
pub border_width: f32,
}
Expand description
A quad primitive with a gradient background, packed into a format for use in rendering.
Fields§
§gradient: PackedGradient
The background gradient data of the quad.
position: [f32; 2]
The position of the [Quad
] in logical points.
size: [f32; 2]
The size of the [Quad
] in logical points.
border_color: PackedSrgb
The border color of the [Quad
], in linear RGB.
border_radius: [f32; 4]
The border radii of the [Quad
] in logical points.
border_width: f32
The border width of the [Quad
] in logical points.
Implementations§
Source§impl GradientQuadPrimitive
impl GradientQuadPrimitive
pub fn new(quad: &GradientQuad) -> Self
Trait Implementations§
Source§impl Clone for GradientQuadPrimitive
impl Clone for GradientQuadPrimitive
Source§fn clone(&self) -> GradientQuadPrimitive
fn clone(&self) -> GradientQuadPrimitive
Returns a duplicate 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 GradientQuadPrimitive
impl Debug for GradientQuadPrimitive
Source§impl<'a> From<&'a GradientQuad> for GradientQuadPrimitive
impl<'a> From<&'a GradientQuad> for GradientQuadPrimitive
Source§fn from(q: &'a GradientQuad) -> GradientQuadPrimitive
fn from(q: &'a GradientQuad) -> GradientQuadPrimitive
Converts to this type from the input type.
Source§impl From<GradientQuad> for GradientQuadPrimitive
impl From<GradientQuad> for GradientQuadPrimitive
Source§fn from(q: GradientQuad) -> GradientQuadPrimitive
fn from(q: GradientQuad) -> GradientQuadPrimitive
Converts to this type from the input type.
Source§impl From<GradientQuadBuilder> for GradientQuadPrimitive
impl From<GradientQuadBuilder> for GradientQuadPrimitive
Source§fn from(q: GradientQuadBuilder) -> GradientQuadPrimitive
fn from(q: GradientQuadBuilder) -> GradientQuadPrimitive
Converts to this type from the input type.
Source§impl PartialEq for GradientQuadPrimitive
impl PartialEq for GradientQuadPrimitive
impl Copy for GradientQuadPrimitive
impl Pod for GradientQuadPrimitive
impl StructuralPartialEq for GradientQuadPrimitive
Auto Trait Implementations§
impl Freeze for GradientQuadPrimitive
impl RefUnwindSafe for GradientQuadPrimitive
impl Send for GradientQuadPrimitive
impl Sync for GradientQuadPrimitive
impl Unpin for GradientQuadPrimitive
impl UnwindSafe for GradientQuadPrimitive
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
.