DashStyle
struct · ferroui-base · v0.5.0
struct DashStyle
Represents the sequence of dashes and gaps that will be applied by a
Pen.
Members
TYPEto_refdashes_propertyoffset_propertyconstructnewwith_dasheswith_dash_listdashdotdash_dotdash_dot_dotdashesset_dashesoffsetset_offsetinvalidatedto_immutable
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<DashStyle>
Returns a strong reference to this object.
dashes_property
fn dashes_property() -> &'static StyledProperty<Option<MediaCollection<f64>>>
offset_property
fn offset_property() -> &'static StyledProperty<f64>
construct
fn construct() -> Self
Creates the class data.
new
fn new() -> Ref<Self>
Creates a dash style without dashes.
with_dashes
fn with_dashes(dashes: Option<&[f64]>, offset: f64) -> Ref<Self>
Creates a dash style with a copy of the given dashes.
with_dash_list
fn with_dash_list(dashes: MediaCollection<f64>, offset: f64) -> Ref<Self>
Creates a dash style that shares the given dash list.
dash
fn dash() -> Rc<ImmutableDashStyle>
Represents a dashed dash style.
dot
fn dot() -> Rc<ImmutableDashStyle>
Represents a dotted dash style.
dash_dot
fn dash_dot() -> Rc<ImmutableDashStyle>
Represents a dashed dotted dash style.
dash_dot_dot
fn dash_dot_dot() -> Rc<ImmutableDashStyle>
Represents a dashed double dotted dash style.
dashes
fn dashes(self: &Self) -> Option<MediaCollection<f64>>
The length of alternating dashes and gaps.
set_dashes
fn set_dashes(self: &Self, value: Option<MediaCollection<f64>>)
offset
fn offset(self: &Self) -> f64
How far in the dash sequence the stroke will start.
set_offset
fn set_offset(self: &Self, value: f64)
invalidated
fn invalidated(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Subscribes to invalidation of the dash style: raised when the dashes
or the offset change. Dropping the returned guard removes the handler;
Subscription::detach keeps it for the life of the dash style.
to_immutable
fn to_immutable(self: &Self) -> ImmutableDashStyle
Returns an immutable clone of the dash style.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeFerroObjectImplExtClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDerefUpcast<T>Upcast<DashStyle>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.