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.
Members
brushdash_styleline_capline_joinmiter_limitthicknessas_anyas_immutable_penas_objectinto_immutable_pento_sharedequals
brush
fn brush(self: &Self) -> Option<Rc<dyn IBrush>>
The brush used to draw the stroke.
dash_style
fn dash_style(self: &Self) -> Option<Rc<dyn IDashStyle>>
The style of dashed lines drawn with the pen.
line_cap
fn line_cap(self: &Self) -> PenLineCap
The type of shape to use on both ends of a line.
line_join
fn line_join(self: &Self) -> PenLineJoin
A value describing how to join consecutive line or curve segments.
miter_limit
fn miter_limit(self: &Self) -> f64
The limit of the ratio of the miter length to half this pen's thickness.
thickness
fn thickness(self: &Self) -> f64
The stroke thickness.
as_any
fn as_any(self: &Self) -> &dyn Any
The implementing value, for downcasts to ImmutablePen.
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).
as_object
fn as_object(self: &Self) -> Option<&FerroObject>
The object behind the pen when it is a mutable Pen.
into_immutable_pen
fn into_immutable_pen(self: Rc<Self>) -> Rc<ImmutablePen>
Converts the pen to an immutable pen; an immutable pen returns itself.
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.
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).
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.