Enum bezier_rs::Join

source ·
pub enum Join {
    Bevel,
    Miter(Option<f64>),
    Round,
}
Expand description

Represents the shape of the join between two segments of a path which meet at an angle. Bevel provides a flat connection, Miter provides a sharp connection, and Round provides a rounded connection. As defined in SVG: https://www.w3.org/TR/SVG2/painting.html#LineJoin.

Variants§

§

Bevel

The join is a straight line between the end points of the offset path sides from the two connecting segments.

§

Miter(Option<f64>)

Optional f64 is the miter limit, which defaults to 4 if None or a value less than 1 is provided. The miter limit is used to prevent highly sharp angles from resulting in excessively long miter joins. If the miter limit is exceeded, the join will be converted to a bevel join. The value is the ratio of the miter length to the stroke width. When that ratio is greater than the miter limit, a bevel join is used instead.

§

Round

The join is a circular arc between the end points of the offset path sides from the two connecting segments.

Trait Implementations§

source§

impl Clone for Join

source§

fn clone(&self) -> Join

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 Copy for Join

Auto Trait Implementations§

§

impl RefUnwindSafe for Join

§

impl Send for Join

§

impl Sync for Join

§

impl Unpin for Join

§

impl UnwindSafe for Join

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.