# IDashStyle

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/trait-idashstyle/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
trait IDashStyle: 'static
```

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

Implemented by [`ImmutableDashStyle`](/docs/0.5.0/api/ferroui-base/media/immutable/struct-immutabledashstyle/) and, through an adapter, by handles ([`Ref`](/docs/0.5.0/api/ferroui-base/struct-ref/)) of
[`DashStyle`](/docs/0.5.0/api/ferroui-base/media/struct-dashstyle/).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_dash_style.rs#L12)

## Members

- [`dashes`](#function-dashes)
- [`offset`](#function-offset)
- [`as_any`](#function-as_any)
- [`as_object`](#function-as_object)
- [`into_immutable_dash_style`](#function-into_immutable_dash_style)
- [`equals`](#function-equals)

<a id="function-dashes"></a>

### dashes

```rust
fn dashes(self: &Self) -> Option<Vec<f64>>
```

The length of alternating dashes and gaps.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_dash_style.rs#L14)

<a id="function-offset"></a>

### offset

```rust
fn offset(self: &Self) -> f64
```

How far in the dash sequence the stroke will start.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_dash_style.rs#L17)

<a id="function-as_any"></a>

### as_any

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

The implementing value, for downcasts to `ImmutableDashStyle`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_dash_style.rs#L20)

<a id="function-as_object"></a>

### as_object

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

The object behind the dash style when it is a mutable `DashStyle`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_dash_style.rs#L23)

<a id="function-into_immutable_dash_style"></a>

### into_immutable_dash_style

```rust
fn into_immutable_dash_style(self: Rc<Self>) -> Rc<ImmutableDashStyle>
```

Converts the dash style to an immutable dash style; an immutable dash
style returns itself.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_dash_style.rs#L29)

<a id="function-equals"></a>

### equals

```rust
fn equals(self: &Self, other: &dyn IDashStyle) -> bool
```

Whether the dash style equals `other`. Mutable dash styles compare by
reference, immutable ones structurally.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/i_dash_style.rs#L39)

## Trait implementations

- [`IDashStyle`](/docs/0.5.0/api/ferroui-base/media/trait-idashstyle/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
