# TextLayoutRoundingPlacement

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/enum-textlayoutroundingplacement/

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

```rust
enum TextLayoutRoundingPlacement
```

Where a text block puts the height layout rounding adds to it: below its text (the
reference's placement, the default) or above it (WinUI's).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/text_layout_rounding_placement.rs#L20)

## Members

- [`Below`](#variant-below)
- [`Above`](#variant-above)
- [`offset`](#function-offset)

<a id="variant-below"></a>

### Below

```rust
Below
```

The text starts at the top of the block (after its padding); the added height is below
it. The placement of the reference, and of the Fluent and Simple themes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/text_layout_rounding_placement.rs#L24)

<a id="variant-above"></a>

### Above

```rust
Above
```

The added height is above the text, as WinUI's TextBlock puts it: the text ends at the
bottom of the rounded box. The placement of the WinUI theme.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/text_layout_rounding_placement.rs#L27)

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

### offset

```rust
fn offset(self: Self, height: f64, scale: f64) -> f64
```

How far down a text block with layout rounding moves its text, in device-independent
pixels: `height` is the height of its content (the text and the vertical padding),
`scale` the layout scale. Zero for `TextLayoutRoundingPlacement::Below`, and for a
height that is a whole number of device pixels already.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/text_layout_rounding_placement.rs#L37)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ResourceKeyObject`](/docs/0.5.0/api/ferroui-base/controls/trait-resourcekeyobject/)
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`ValueTypeRegistration`](/docs/0.5.0/api/ferroui-base/data/core/trait-valuetyperegistration/)
- `Clone`
- `Copy`
- `Debug`
- `Default`
- `StructuralPartialEq`
- `PartialEq`
- `Eq`
- `Hash`
- [`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/).
