ImmutablePen
struct · ferroui-base · v0.5.0
struct ImmutablePen
Describes how a stroke is drawn.
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.
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.
from_uint32
fn from_uint32(color: u32, thickness: f64) -> Self
Creates a solid pen with the color given as an 0xAARRGGBB value.
brush
fn brush(self: &Self) -> Option<Rc<dyn IBrush>>
The brush used to draw the stroke.
thickness
fn thickness(self: &Self) -> f64
The stroke thickness.
dash_style
fn dash_style(self: &Self) -> Option<Rc<dyn IDashStyle>>
The dash style for the stroke.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherCloneDebugIPenPartialEq
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.