FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DashStyle

    struct · ferroui-base · v0.5.0

    struct DashStyle
    

    Represents the sequence of dashes and gaps that will be applied by a Pen.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<DashStyle>
    

    Returns a strong reference to this object.

    Source

    dashes_property

    fn dashes_property() -> &'static StyledProperty<Option<MediaCollection<f64>>>
    

    Source

    offset_property

    fn offset_property() -> &'static StyledProperty<f64>
    

    Source

    construct

    fn construct() -> Self
    

    Creates the class data.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a dash style without dashes.

    Source

    with_dashes

    fn with_dashes(dashes: Option<&[f64]>, offset: f64) -> Ref<Self>
    

    Creates a dash style with a copy of the given dashes.

    Source

    with_dash_list

    fn with_dash_list(dashes: MediaCollection<f64>, offset: f64) -> Ref<Self>
    

    Creates a dash style that shares the given dash list.

    Source

    dash

    fn dash() -> Rc<ImmutableDashStyle>
    

    Represents a dashed dash style.

    Source

    dot

    fn dot() -> Rc<ImmutableDashStyle>
    

    Represents a dotted dash style.

    Source

    dash_dot

    fn dash_dot() -> Rc<ImmutableDashStyle>
    

    Represents a dashed dotted dash style.

    Source

    dash_dot_dot

    fn dash_dot_dot() -> Rc<ImmutableDashStyle>
    

    Represents a dashed double dotted dash style.

    Source

    dashes

    fn dashes(self: &Self) -> Option<MediaCollection<f64>>
    

    The length of alternating dashes and gaps.

    Source

    set_dashes

    fn set_dashes(self: &Self, value: Option<MediaCollection<f64>>)
    

    Source

    offset

    fn offset(self: &Self) -> f64
    

    How far in the dash sequence the stroke will start.

    Source

    set_offset

    fn set_offset(self: &Self, value: f64)
    

    Source

    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.

    Source

    to_immutable

    fn to_immutable(self: &Self) -> ImmutableDashStyle
    

    Returns an immutable clone of the dash style.

    Source

    Trait implementations

    Availability

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