#[repr(C)]pub struct RectInstance {Show 14 fields
pub pos: [f32; 2],
pub size: [f32; 2],
pub color: [f32; 4],
pub radius: [f32; 4],
pub border_width: f32,
pub border_color: [f32; 4],
pub shadow_color: [f32; 4],
pub shadow_offset: [f32; 2],
pub shadow_blur: f32,
pub clip_rect: [f32; 4],
pub grayscale: f32,
pub brightness: f32,
pub opacity: f32,
pub border_alignment: f32,
}Expand description
One rectangle — uploaded as a GPU instance. Field order matches shader @location order exactly.
offset 0 loc 0 pos [f32;2] offset 8 loc 1 size [f32;2] offset 16 loc 2 color [f32;4] offset 32 loc 3 radius [f32;4] offset 48 loc 4 border_width f32 offset 52 loc 5 border_color [f32;4] offset 68 loc 6 shadow_color [f32;4] offset 84 loc 7 shadow_offset [f32;2] offset 92 loc 8 shadow_blur f32 offset 96 loc 9 clip_rect [f32;4] offset 112 loc 10 grayscale f32 offset 116 loc 11 brightness f32 offset 120 loc 12 opacity f32 total: 124 bytes
Fields§
§pos: [f32; 2]§size: [f32; 2]§color: [f32; 4]§radius: [f32; 4]§border_width: f32§border_color: [f32; 4]§shadow_color: [f32; 4]§shadow_offset: [f32; 2]§shadow_blur: f32§clip_rect: [f32; 4]§grayscale: f32§brightness: f32§opacity: f32§border_alignment: f32Implementations§
Source§impl RectInstance
impl RectInstance
pub const fn desc() -> VertexBufferLayout<'static>
Trait Implementations§
Source§impl Clone for RectInstance
impl Clone for RectInstance
Source§fn clone(&self) -> RectInstance
fn clone(&self) -> RectInstance
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 RectInstance
Source§impl Debug for RectInstance
impl Debug for RectInstance
Source§impl Default for RectInstance
impl Default for RectInstance
impl Pod for RectInstance
Auto Trait Implementations§
impl Freeze for RectInstance
impl RefUnwindSafe for RectInstance
impl Send for RectInstance
impl Sync for RectInstance
impl Unpin for RectInstance
impl UnsafeUnpin for RectInstance
impl UnwindSafe for RectInstance
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.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> NoUninit for Twhere
T: Pod,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().