FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IPen

    trait · ferroui-base · v0.5.0

    trait IPen: 'static
    

    Describes how a stroke is drawn.

    Implemented by ImmutablePen and, through an adapter, by handles (Ref) of Pen.

    View source

    Members

    brush

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

    The brush used to draw the stroke.

    Source

    dash_style

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

    The style of dashed lines drawn with the pen.

    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

    thickness

    fn thickness(self: &Self) -> f64
    

    The stroke thickness.

    Source

    as_any

    fn as_any(self: &Self) -> &dyn Any
    

    The implementing value, for downcasts to ImmutablePen.

    Source

    as_immutable_pen

    fn as_immutable_pen(self: &Self) -> Option<&ImmutablePen>
    

    The pen viewed as an ImmutablePen, when it is one (the is ImmutablePen test of upstream, which a class deriving from it passes).

    Source

    as_object

    fn as_object(self: &Self) -> Option<&FerroObject>
    

    The object behind the pen when it is a mutable Pen.

    Source

    into_immutable_pen

    fn into_immutable_pen(self: Rc<Self>) -> Rc<ImmutablePen>
    

    Converts the pen to an immutable pen; an immutable pen returns itself.

    Source

    to_shared

    fn to_shared(self: &Self) -> Option<crate::media::SharedPen>
    

    The form of the pen that is sent to the render thread, when the type keeps one: see SharedPen.

    Source

    equals

    fn equals(self: &Self, other: &dyn IPen) -> bool
    

    Whether the pen equals other. Mutable pens compare by reference, immutable ones structurally (against any pen).

    Source

    Trait implementations

    Availability

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