FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ImmutablePen

    struct · ferroui-base · v0.5.0

    struct ImmutablePen
    

    Describes how a stroke is drawn.

    View source

    Members

    new

    fn new(brush: Option<Rc<dyn IImmutableBrush>>, thickness: f64, dash_style: Option<Rc<ImmutableDashStyle>>, line_cap: PenLineCap, line_join: PenLineJoin, miter_limit: f64) -> Self
    

    Creates a pen.

    Source

    with_brush

    fn with_brush(brush: Option<Rc<dyn IImmutableBrush>>, thickness: f64) -> Self
    

    Creates a solid pen with the given brush and thickness: no dashes, flat caps, miter joins and a miter limit of 10.

    Source

    from_uint32

    fn from_uint32(color: u32, thickness: f64) -> Self
    

    Creates a solid pen with the color given as an 0xAARRGGBB value.

    Source

    brush

    fn brush(self: &Self) -> Option<Rc<dyn IBrush>>
    

    The brush used to draw the stroke.

    Source

    thickness

    fn thickness(self: &Self) -> f64
    

    The stroke thickness.

    Source

    dash_style

    fn dash_style(self: &Self) -> Option<Rc<dyn IDashStyle>>
    

    The dash style for the stroke.

    Source

    line_cap

    fn line_cap(self: &Self) -> PenLineCap
    

    The type of shape to use on both ends of a line.

    Source

    line_join

    fn line_join(self: &Self) -> PenLineJoin
    

    A value describing how to join consecutive line or curve segments.

    Source

    miter_limit

    fn miter_limit(self: &Self) -> f64
    

    The limit of the ratio of the miter length to half this pen's thickness.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • PropertyValue
    • AnyValue
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • IPen
    • PartialEq

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.