# DropShadowDirectionEffect

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/struct-dropshadowdirectioneffect/

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

```rust
struct DropShadowDirectionEffect
```

An effect that draws a shadow behind its content, positioned by a
direction and a depth.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`shadow_depth_property`](#function-shadow_depth_property)
- [`direction_property`](#function-direction_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`shadow_depth`](#function-shadow_depth)
- [`set_shadow_depth`](#function-set_shadow_depth)
- [`direction`](#function-direction)
- [`set_direction`](#function-set_direction)
- [`offset_x`](#function-offset_x)
- [`offset_y`](#function-offset_y)
- [`to_immutable`](#function-to_immutable)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

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

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<DropShadowDirectionEffect>
```

Returns a strong reference to this object.

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

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

### shadow_depth_property

```rust
fn shadow_depth_property() -> &'static StyledProperty<f64>
```



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

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

### direction_property

```rust
fn direction_property() -> &'static StyledProperty<f64>
```



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

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

### construct

```rust
fn construct() -> Self
```

Creates the class data.

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

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

### new

```rust
fn new() -> Ref<Self>
```



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

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

### shadow_depth

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

The distance of the shadow from the content.

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

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

### set_shadow_depth

```rust
fn set_shadow_depth(self: &Self, value: f64)
```



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

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

### direction

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

The direction of the shadow, in degrees.

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

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

### set_direction

```rust
fn set_direction(self: &Self, value: f64)
```



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

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

### offset_x

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

The horizontal offset of the shadow.

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

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

### offset_y

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

The vertical offset of the shadow.

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

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

### to_immutable

```rust
fn to_immutable(self: &Self) -> std::sync::Arc<dyn IImmutableEffect>
```

Creates an immutable clone of the effect.

As in the reference implementation, the computed offsets are handed
to the immutable effect as its direction and depth.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<DropShadowDirectionEffect>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)

## Availability

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