#[repr(C)]pub struct RawCurveInput {
pub p0: [f32; 2],
pub p1: [f32; 2],
pub p2: [f32; 2],
pub p3: [f32; 2],
pub stroke_width: f32,
pub flags: u32,
pub z_index: f32,
pub _pad: f32,
pub color: [f32; 4],
}Expand description
64-byte aligned raw cubic curve input data fed into WebGPU compute pipelines.
Fields§
§p0: [f32; 2]§p1: [f32; 2]§p2: [f32; 2]§p3: [f32; 2]§stroke_width: f32§flags: u32§z_index: f32§_pad: f32§color: [f32; 4]Implementations§
Source§impl RawCurveInput
impl RawCurveInput
pub const BYTE_SIZE: usize
pub fn new_cubic( cubic: &CubicBezier, stroke_width: f32, flags: u32, color: [f32; 4], z_index: f32, ) -> Self
pub fn new_quadratic( quad: &QuadraticBezier, stroke_width: f32, flags: u32, color: [f32; 4], z_index: f32, ) -> Self
pub fn new_line( p0: Point2D, p1: Point2D, stroke_width: f32, flags: u32, color: [f32; 4], z_index: f32, ) -> Self
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn slice_to_bytes(slice: &[Self]) -> &[u8] ⓘ
Trait Implementations§
Source§impl Clone for RawCurveInput
impl Clone for RawCurveInput
impl Copy for RawCurveInput
Source§impl Debug for RawCurveInput
impl Debug for RawCurveInput
Source§impl PartialEq for RawCurveInput
impl PartialEq for RawCurveInput
impl StructuralPartialEq for RawCurveInput
Auto Trait Implementations§
impl Forget for RawCurveInput
impl Freeze for RawCurveInput
impl Move for RawCurveInput
impl RefUnwindSafe for RawCurveInput
impl Send for RawCurveInput
impl Sync for RawCurveInput
impl Unpin for RawCurveInput
impl UnsafeUnpin for RawCurveInput
impl UnwindSafe for RawCurveInput
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