#[repr(C)]pub struct ShapeRecordCurve {
pub radii: [f32; 4],
pub arc_normalized: [f32; 4],
}Expand description
Corner radii and arc-angle properties, in instance-buffer layout.
Fields§
§radii: [f32; 4]Corner radii for rectangles; zero for bands, whose trig the GPU
derives from arc_normalized once per uploaded band and writes here.
No other record’s row equals the row of a band that draws: such a
band’s sweep, arc_normalized[1], is positive and its radii and
arc_normalized[2..] zero, while a rect’s and an unbanded round
rect’s arc_normalized is zero, a banded ring’s radii are positive,
a line of positive length carries its half length in
arc_normalized[2] and one of no length points along +X. A record
that becomes or stops being a band therefore uploads a row of its
own, and a band whose row is unchanged keeps its trig.
arc_normalized: [f32; 4]A band’s normalised start and sweep, the rest zero; a line’s unit direction and half length.
Trait Implementations§
Source§impl Clone for ShapeRecordCurve
impl Clone for ShapeRecordCurve
impl Copy for ShapeRecordCurve
Source§impl Debug for ShapeRecordCurve
impl Debug for ShapeRecordCurve
Source§impl PartialEq for ShapeRecordCurve
impl PartialEq for ShapeRecordCurve
impl Pod for ShapeRecordCurve
impl StructuralPartialEq for ShapeRecordCurve
Auto Trait Implementations§
impl Freeze for ShapeRecordCurve
impl RefUnwindSafe for ShapeRecordCurve
impl Send for ShapeRecordCurve
impl Sync for ShapeRecordCurve
impl Unpin for ShapeRecordCurve
impl UnsafeUnpin for ShapeRecordCurve
impl UnwindSafe for ShapeRecordCurve
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
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
bits
as &Self.