Struct makepad_widgets::makepad_vector::geometry::CubicSegment
#[repr(C)]pub struct CubicSegment {
pub p0: Point,
pub p1: Point,
pub p2: Point,
pub p3: Point,
}Expand description
A cubic bezier curve segment in 2-dimensional Euclidian space.
Fields§
§p0: Point§p1: Point§p2: Point§p3: PointImplementations§
§impl CubicSegment
impl CubicSegment
pub fn new(p0: Point, p1: Point, p2: Point, p3: Point) -> CubicSegment
pub fn new(p0: Point, p1: Point, p2: Point, p3: Point) -> CubicSegment
Creates a new cubic bezier curve segment with the given control points.
pub fn is_approximately_linear(self, epsilon: f64) -> bool
pub fn is_approximately_linear(self, epsilon: f64) -> bool
Returns true if self is approximately linear with tolerance epsilon.
pub fn split(self, t: f64) -> (CubicSegment, CubicSegment)
pub fn split(self, t: f64) -> (CubicSegment, CubicSegment)
Splits self into two quadratic Bezier curve segments, at parameter t.
Trait Implementations§
§impl Clone for CubicSegment
impl Clone for CubicSegment
§fn clone(&self) -> CubicSegment
fn clone(&self) -> CubicSegment
Returns a copy 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 more§impl Debug for CubicSegment
impl Debug for CubicSegment
§impl PartialEq<CubicSegment> for CubicSegment
impl PartialEq<CubicSegment> for CubicSegment
§fn eq(&self, other: &CubicSegment) -> bool
fn eq(&self, other: &CubicSegment) -> bool
This method tests for
self and other values to be equal, and is used
by ==.§impl Transform for CubicSegment
impl Transform for CubicSegment
fn transform<T>(self, t: &T) -> CubicSegmentwhere T: Transformation,
fn transform_mut<T>(&mut self, t: &T)where T: Transformation,
impl Copy for CubicSegment
impl StructuralPartialEq for CubicSegment
Auto Trait Implementations§
impl RefUnwindSafe for CubicSegment
impl Send for CubicSegment
impl Sync for CubicSegment
impl Unpin for CubicSegment
impl UnwindSafe for CubicSegment
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