#[repr(C)]pub struct RectVertex {
pub position: [f32; 2],
pub color: [f32; 4],
}Expand description
Vertex for the colored rectangle pipeline (decorations).
Fields§
§position: [f32; 2]§color: [f32; 4]Implementations§
Source§impl RectVertex
impl RectVertex
Sourcepub fn from_decoration(
rect: &DecorationRect,
scale_factor: f32,
) -> [RectVertex; 4]
pub fn from_decoration( rect: &DecorationRect, scale_factor: f32, ) -> [RectVertex; 4]
Convert a decoration rect to 4 vertices.
Trait Implementations§
Source§impl Clone for RectVertex
impl Clone for RectVertex
Source§fn clone(&self) -> RectVertex
fn clone(&self) -> RectVertex
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 RectVertex
Source§impl Debug for RectVertex
impl Debug for RectVertex
impl Pod for RectVertex
Auto Trait Implementations§
impl Freeze for RectVertex
impl RefUnwindSafe for RectVertex
impl Send for RectVertex
impl Sync for RectVertex
impl Unpin for RectVertex
impl UnsafeUnpin for RectVertex
impl UnwindSafe for RectVertex
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.