Skip to main content

StrokeParams

Struct StrokeParams 

Source
pub struct StrokeParams<'a> {
    pub line_width: f64,
    pub line_cap: LineCap,
    pub line_join: LineJoin,
    pub miter_limit: f64,
    pub flatness: f64,
    pub stroke_adjust: bool,
    pub line_dash: &'a [f64],
    pub line_dash_phase: f64,
    pub vector_antialias: bool,
}
Expand description

Parameters governing how a stroke is rendered.

All fields mirror the correspondingly named fields on the C++ SplashState.

Fields§

§line_width: f64

Stroke line width in user space.

§line_cap: LineCap

Line cap style (Butt / Round / Projecting).

§line_join: LineJoin

Line join style (Miter / Round / Bevel).

§miter_limit: f64

Miter limit (dimensionless ratio).

§flatness: f64

Flatness for curve flattening (maximum chord deviation, device pixels).

§stroke_adjust: bool

Whether stroke adjustment is enabled.

§line_dash: &'a [f64]

Dash array; empty slice means solid line.

§line_dash_phase: f64

Phase offset into the dash array.

§vector_antialias: bool

Whether vector anti-aliasing is requested.

Auto Trait Implementations§

§

impl<'a> Freeze for StrokeParams<'a>

§

impl<'a> RefUnwindSafe for StrokeParams<'a>

§

impl<'a> Send for StrokeParams<'a>

§

impl<'a> Sync for StrokeParams<'a>

§

impl<'a> Unpin for StrokeParams<'a>

§

impl<'a> UnsafeUnpin for StrokeParams<'a>

§

impl<'a> UnwindSafe for StrokeParams<'a>

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.