cosmic::widget::canvas::path::lyon_path

Type Alias PathEvent

source
pub type PathEvent = Event<Point2D<f32, UnknownUnit>, Point2D<f32, UnknownUnit>>;
Expand description

A path event representing endpoints and control points as positions.

Aliased Type§

enum PathEvent {
    Begin {
        at: Point2D<f32, UnknownUnit>,
    },
    Line {
        from: Point2D<f32, UnknownUnit>,
        to: Point2D<f32, UnknownUnit>,
    },
    Quadratic {
        from: Point2D<f32, UnknownUnit>,
        ctrl: Point2D<f32, UnknownUnit>,
        to: Point2D<f32, UnknownUnit>,
    },
    Cubic {
        from: Point2D<f32, UnknownUnit>,
        ctrl1: Point2D<f32, UnknownUnit>,
        ctrl2: Point2D<f32, UnknownUnit>,
        to: Point2D<f32, UnknownUnit>,
    },
    End {
        last: Point2D<f32, UnknownUnit>,
        first: Point2D<f32, UnknownUnit>,
        close: bool,
    },
}

Variants§

Implementations

source§

impl<Ep, Cp> Event<Ep, Cp>

source

pub fn is_edge(&self) -> bool

source

pub fn from(&self) -> Ep
where Ep: Clone,

source

pub fn to(&self) -> Ep
where Ep: Clone,

source

pub fn with_points( &self, ) -> Event<Point2D<f32, UnknownUnit>, Point2D<f32, UnknownUnit>>
where Ep: Position, Cp: Position,

source§

impl Event<Point2D<f32, UnknownUnit>, Point2D<f32, UnknownUnit>>

Trait Implementations

source§

impl<Endpoint, ControlPoint> Clone for Event<Endpoint, ControlPoint>
where Endpoint: Clone, ControlPoint: Clone,

source§

fn clone(&self) -> Event<Endpoint, ControlPoint>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Endpoint, ControlPoint> Debug for Event<Endpoint, ControlPoint>
where Endpoint: Debug, ControlPoint: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<Endpoint, ControlPoint> Hash for Event<Endpoint, ControlPoint>
where Endpoint: Hash, ControlPoint: Hash,

source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<Endpoint, ControlPoint> PartialEq for Event<Endpoint, ControlPoint>
where Endpoint: PartialEq, ControlPoint: PartialEq,

source§

fn eq(&self, other: &Event<Endpoint, ControlPoint>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Endpoint, ControlPoint> Copy for Event<Endpoint, ControlPoint>
where Endpoint: Copy, ControlPoint: Copy,

source§

impl<Endpoint, ControlPoint> Eq for Event<Endpoint, ControlPoint>
where Endpoint: Eq, ControlPoint: Eq,

source§

impl<Endpoint, ControlPoint> StructuralPartialEq for Event<Endpoint, ControlPoint>