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

Type Alias IdEvent

source
pub type IdEvent = Event<EndpointId, ControlPointId>;
Expand description

A path event representing endpoints and control points as IDs.

Aliased Type§

enum IdEvent {
    Begin {
        at: EndpointId,
    },
    Line {
        from: EndpointId,
        to: EndpointId,
    },
    Quadratic {
        from: EndpointId,
        ctrl: ControlPointId,
        to: EndpointId,
    },
    Cubic {
        from: EndpointId,
        ctrl1: ControlPointId,
        ctrl2: ControlPointId,
        to: EndpointId,
    },
    End {
        last: EndpointId,
        first: EndpointId,
        close: bool,
    },
}

Variants§

§

Begin

Fields

§

Line

Fields

§

Quadratic

§

Cubic

§

End

Fields

§close: bool

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,

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>