# CornerRadiusToThicknessConverter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-themes-material/converters/struct-cornerradiustothicknessconverter/

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

```rust
struct CornerRadiusToThicknessConverter
```

Converts a corner radius to a thickness whose sides are corners of the radius, chosen by the
conversion kind and multiplied by the multiplier.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/Converters/corner_radius_to_thickness_converter.rs#L75)

## Members

- [`new`](#function-new)
- [`conversion_kind`](#function-conversion_kind)
- [`set_conversion_kind`](#function-set_conversion_kind)
- [`multiplier`](#function-multiplier)
- [`set_multiplier`](#function-set_multiplier)
- [`convert_radius`](#function-convert_radius)

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

### new

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

Creates a converter of the default kind (`FilterLeftAndRightFromTop`) with the multiplier 1.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/Converters/corner_radius_to_thickness_converter.rs#L95)

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

### conversion_kind

```rust
fn conversion_kind(self: &Self) -> CornerRadiusToThicknessConverterKind
```

Gets which corners become which sides of the thickness.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/Converters/corner_radius_to_thickness_converter.rs#L100)

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

### set_conversion_kind

```rust
fn set_conversion_kind(self: &Self, value: CornerRadiusToThicknessConverterKind)
```

Sets which corners become which sides of the thickness.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/Converters/corner_radius_to_thickness_converter.rs#L105)

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

### multiplier

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

Gets the factor every side of the thickness is multiplied by.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/Converters/corner_radius_to_thickness_converter.rs#L110)

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

### set_multiplier

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

Sets the factor every side of the thickness is multiplied by.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/Converters/corner_radius_to_thickness_converter.rs#L115)

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

### convert_radius

```rust
fn convert_radius(radius: CornerRadius, kind: CornerRadiusToThicknessConverterKind, multiplier: f64) -> Thickness
```

The thickness of a corner radius for a conversion kind and a multiplier (the `Convert`
overload of WinUI that takes the radius, the kind and the multiplier).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/Converters/corner_radius_to_thickness_converter.rs#L121)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `CastableFrom<ST, Uninit, Uninit>`
- `CastableFrom<ST, Initialized, Initialized>`
- `Read<Exclusive, BecauseExclusive>`
- `Default`
- `PartialEq`
- [`IValueConverter`](/docs/0.5.0/api/ferroui-base/data/converters/trait-ivalueconverter/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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